Here Is My Code,
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int place = 1;
long ans = 0;
while(n != 0){
int rem = n % 2;
ans = ans + (rem * place);
n = n / 2;
place = place * 10;
}
System.out.println(ans);
}
}