SHARE
TWEET

legendre-steveverrill.c

a guest May 22nd, 2014 195 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. a,b,c,d,m=1,n,q,r;main(){for(scanf("%d",&n);n%4<1;n/=4)m*=2;for(a=sqrt(n),n-=a*a,a-=(3+n)%4/2;r=n-b*b-c*c,d=sqrt(r),d*d-r;c=q%256)b=++q>>8;printf("%d %d %d %d",a*m,b*m,c*m,d*m);}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top