标签:special style class bsp ++ end span return rip
题意:若a+b+c=1000,且a2+b2=c2,求abc
代码如下:
1 #ifndef PRO9_H_INCLUDED 2 #define PRO9_H_INCLUDED 3 4 int solve(){ 5 for(int i=1;i<=1000;++i) 6 for(int j=1;i+j<1000;++j) 7 if(i*i+j*j==(1000-i-j)*(1000-i-j)) 8 return i*j*(1000-i-j); 9 } 10 11 #endif // PRO9_H_INCLUDED
标签:special style class bsp ++ end span return rip
原文地址:http://www.cnblogs.com/barrier/p/6294279.html