Skip to main content
2 of 9
edited body
sinvec
  • 2k
  • 6
  • 28

C (gcc), 88 bytes

a,b;f(n){a=1e3,b;while(a+1){b=1e3;while(b+1){if(a*a+b*b==n)return 1;b--;}a--;}return 0;}

Try it online!

sinvec
  • 2k
  • 6
  • 28