#include<iostream> #include<string> using namespace std; //十进制转换成二进制 int zhuanhuan(int n){ int sum=0,p=1; while(n>0){ int t=n%2; sum=sum+t*p; p=p*10; n=n/2; } return sum; } //判断是否奇校验 bool jiaoyanwei(int n){ int count=0;//记录1的个数 while(n>0){ if(n%10==1) count++; n=n/10; } if(count%2==1) return true; else return false; } int main(){ char s[101]; while(scanf("%s",s)!=EOF){ string str=s; int len=str.length(); int i; for(i=0;i<len;i++){ int s=zhuanhuan(int(str[i])); //cout<<s<<endl; bool flag=jiaoyanwei(s); //cout<<flag<<endl; if(flag) printf("%d",0); else printf("%d",1); printf("%07d\n",s); } } }