fork download
  1. #include <stdlib.h>
  2. #define H 65536
  3. #define I if(u%H==r%H)
  4. #define Q(n,v) n=(n*v)%2147483647
  5. #define U Q(u,16807)
  6. #define R Q(r,48271)
  7. #define F(n) for(i=0;i<n;i++)
  8. main(int c,char**v){int a=516,b=190,o=0,m=0,i;long long int u=a,r=b;F(40000000){U;R;I o++;}u=a,r=b;F(5000000){do{U;}while(u%4);do{R;}while(r%8);I m++;}return printf("%d %d\n",o,m),0;}
Success #stdin #stdout 0.52s 4400KB
stdin
Standard input is empty
stdout
597 303