Skip to main content
1 of 2
Sp3000
  • 62.3k
  • 13
  • 117
  • 292

><>, 7 bytes

i2%:n:, 

This uses the fact that ><> pushes -1 on EOF, which is 1 mod 2. It also uses divide by 0 for termination (which is apparently okay since the consensus is that STDERR output is ignored).

Sp3000
  • 62.3k
  • 13
  • 117
  • 292