Challenges : Von Neuman Loves Binary

what is the error in my code ???
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s = new Scanner(System.in);
int t = s.nextInt();
for (int i = 0; i<t; i++)
{Scanner p = new Scanner(System.in);
int n = p.nextInt();
int j = 0;
int sum = 0;
int multiplier = 1;
while (n>0)
{sum = sum + (n%10)*multiplier;
multiplier = multiplier * 2;
n = n/10;
j++;}
System.out.println(sum); }

}

}

HI @Sejalrathi,
you should define only one scanner in the program
check the comment in the code

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.