Skip to main content
1 of 3
Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282

Jelly, 28 bytes

Ɠ⁽¿ÇB31_+2¦4ḍ~ƊR;€"J$ḅ³Fċ:³$

A full program accepting a single integer from STDIN which prints a 1 or 0 to STDOUT.

Try it online! Or see the test-suite.

Jonathan Allan
  • 110.1k
  • 7
  • 65
  • 282