fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. long long a,b,c;
  7. for(a=1; a<1000; a++)
  8. {
  9. for(b=1;b<1000; b++)
  10. {
  11. c = 1000-a-b;
  12. if(a < b && b < c && (a*a + b*b - c*c == 0))
  13. {
  14. cout << a << ' ' << b << ' ' << c << '\n';
  15. cout<<a*b*c << '\n';
  16. }
  17. }
  18. }
  19. }
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
200 375 425
31875000