Skip to main content
6 of 9
added 58 characters in body
sinvec
  • 2k
  • 6
  • 28

C (gcc), 88 74 67 bytes

a,b,g;f(n){g=1;for(a=n;a+1&&g;a--)for(b=n;b+1&&g;b--)g=a*a+b*b!=n;}

-14 bytes - thanks Kevin Cruijssen
-7 bytes - by omitting return (using global variable)

Try it online!

sinvec
  • 2k
  • 6
  • 28