Skip to main content
deleted 2 characters in body
Source Link
Rosario
  • 1.7k
  • 5
  • 9

C (gcc), 3332 bytes

f(a){return!a|a%4?a%8!=7-7:f(a/4);} 

Try it online!Try it online!

It should be ok for 0 too. Thank you to @ceilingcat for suggestion from || to |.

C (gcc), 33 bytes

f(a){return!a|a%4?a%8!=7:f(a/4);} 

Try it online!

It should be ok for 0 too. Thank you to @ceilingcat for suggestion from || to |.

C (gcc), 32 bytes

f(a){return!a|a%4?a%8-7:f(a/4);} 

Try it online!

It should be ok for 0 too. Thank you to @ceilingcat for suggestion from || to |.

added 53 characters in body
Source Link
Rosario
  • 1.7k
  • 5
  • 9

C (gcc), 3433 bytes

f(a){return!a||a%4a|a%4?a%8!=7:f(a/4);} 

Try it online!Try it online!

It should be ok for 0 too. Thank you to @ceilingcat for suggestion from || to |.

C (gcc), 34 bytes

f(a){return!a||a%4?a%8!=7:f(a/4);} 

Try it online!

It should be ok for 0 too.

C (gcc), 33 bytes

f(a){return!a|a%4?a%8!=7:f(a/4);} 

Try it online!

It should be ok for 0 too. Thank you to @ceilingcat for suggestion from || to |.

Source Link
Rosario
  • 1.7k
  • 5
  • 9

C (gcc), 34 bytes

f(a){return!a||a%4?a%8!=7:f(a/4);} 

Try it online!

It should be ok for 0 too.