Skip to main content
Commonmark migration
Source Link

#Java, 149 128 120 bytes

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.

#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.

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.

added 100 characters in body
Source Link
intrepidcoder
  • 2.7k
  • 13
  • 36

#Java, 149 128128 120 bytes

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

Why 128120 bytes? Because Java.

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

#Java, 149 128 bytes

class A{public static void main(String[]a){int n=new java.util.Scanner(System.in).nextInt();do System.out.print(n);while(n>0);}}

Why 128 bytes? Because Java.

Edit: Saved 21 bytes thanks to Justin.

#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.

added 88 characters in body
Source Link
intrepidcoder
  • 2.7k
  • 13
  • 36

#Java, 149149 128 bytes

import java.util.*;classclass A{public static void main(String[]a){Scannerint s=newn=new java.util.Scanner(System.in);int n=s.nextInt();do System.out.print(n);while(n>0);}}

Why 149128 bytes? Because Java.

Edit: Saved 21 bytes thanks to Justin.

#Java, 149 bytes

import java.util.*;class A{public static void main(String[]a){Scanner s=new Scanner(System.in);int n=s.nextInt();do System.out.print(n);while(n>0);}}

Why 149 bytes? Because Java.

#Java, 149 128 bytes

class A{public static void main(String[]a){int n=new java.util.Scanner(System.in).nextInt();do System.out.print(n);while(n>0);}}

Why 128 bytes? Because Java.

Edit: Saved 21 bytes thanks to Justin.

Source Link
intrepidcoder
  • 2.7k
  • 13
  • 36
Loading