Skip to main content
4 of 4
Commonmark migration

Java, 149 128 120 bytes

class A{public static void main(String[]a)throws Exception{int n=System.in.read()%2;do System.out.print(n);while(n>0);}}

Why 120 bytes? Because Java.

Edit: Saved 21 bytes thanks to Justin. Saved 8 bytes thanks to dohaqatar7.

intrepidcoder
  • 2.7k
  • 13
  • 36