Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- using namespace std;
- int main()
- {
- long k;
- int x,y;
- cin>>k;
- for(x=1;x<=sqrt(k/2);x++)
- {
- y=sqrt(k-x*x);
- if(y*y==k-x*x)
- {
- cout<<x<<" "<<y;
- cout<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement