this code is not working
import java.util.Scanner;
import java.lang.Math ;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int[] bn = new int [num] ;
for(int j=0;j<num;j++)
{
bn[j] = sc.nextInt();
}
for(int j=0;j<num ;j++)
{ int tmp1,tmp2;
int dn=0 , rem=0 ; // rem for remainder
int n = (int)Math.log10(bn[j]) + 1 ;
if(bn[j]<0)
{
System.out.println(“False”);
continue;
}
if(bn[j]>0)
{ for(int k=0 ; k<n;k++)
{ tmp1 = bn[j];
tmp2 = tmp1 % 10;
tmp1 = tmp1 /10;}
if(!(tmp2==0||tmp2==1))
{
System.out.println(“False”);
continue;
}
else
{
for(int i = 0; i<n;i++)
{
rem = bn[j] % 10;
dn += Math.pow(2,i)*rem;
bn[j] = bn[j] / 10 ;
}
System.out.println(dn);
} }}
}
}