编辑代码

#include<stdio.h>
int main()
{
int i=1;
int c=0;
int a,b;
scanf("%d",&a);
while(a>0)
hjb=a%10;
c=c+b*i;
i=i*2;
a=a/10;
}
printf("%d",c);
}