Doubt about von neuman loves binary

package challanges;

import java.util.Scanner;

public class challage3 {

public static void main(String[] args) {
	Scanner scn =new Scanner(System.in);
	int n=scn.nextInt();
	
	
	int remainder;
	int j=1;
	int decimalno=0;
	
    for (int i=scn.nextInt();i<n;i++) {
    	
    	while (i !=0) {
    		
    		remainder=decimalno/10;
    		decimalno=decimalno +remainder*j;
    		j=j*2;
    		i=i/10;
    		
    	}
    	System.out.println(decimalno);
    }
}

}
what is wrong in this code???

take the input in a string format because it’s length can be huge

I have not studied string

Then I suggest you wait till you learn about strings and then attempt the question

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.