#include
int main ()
{
int n,x,d,m=0;
scanf("%d",&n);
while(n--)
{
scanf("%d",&x);
if(x>0&&x<=10000)
m=0;
d=x;
do
{
m=m*10+x%2;
x=x/2;
}while(x!=0);
if(d%2!=0)
printf("%d\n",m);
if(d%2==0)
printf("%d\n",m*10);
}
return 0;
}
它编译无问题,就是运行时输入2,12等数时出现问题,5,10却没问题