#include
#include
using namespace std;
int main() {
int n,N,s=0,p,x=0;
cin>>N;
for(int i=0;i<N;i++){
cin>>n;
while(n>0){
n=n%10;
p=pow(2,x);
x++;
s=s+p*n;
n=n/10;
}
cout<<s<<endl;;
}
return 0;
}
this code giving wrong answer