Advertisement
SelinD

v97s3e4

May 7th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iostream>
  2. #include<cmath>
  3. using namespace std;
  4. int main()
  5. {
  6. long k;
  7. int x,y;
  8. cin>>k;
  9. for(x=1;x<=sqrt(k/2);x++)
  10. {
  11. y=sqrt(k-x*x);
  12. if(y*y==k-x*x)
  13. {
  14. cout<<x<<" "<<y;
  15. cout<<endl;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement