Advertisement
a53

FPatrate

a53
Aug 29th, 2022
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. void patrate(int n,int &x,int &y)
  2. {
  3. bool ok=true;
  4. for(int i=2;i*i<=n&&ok==true;++i)
  5. for(int j=i+1;i*i*j*j<=n&&ok==true;++j)
  6. if(i*i*j*j==n)
  7. ok=false,x=i,y=j;
  8. if(ok)
  9. x=0,y=0;
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement