#include<stdio.h>
#include<stdlib.h>
#include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m,n,o,p,r,s,t,u,v,w,x,y,z,zz,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2,m2,n2,o2,q=0;
while(cin>>q){
a=q%2;
b=q/2;
c=b%2;
d=b/2;
e=d%2;
f=d/2;
g=f%2;
h=f/2;
i=h%2;
j=h/2;
k=j%2;
l=j/2;
m=l%2;
n=l/2;
o=n%2;
p=n/2;
r=p%2;
s=p/2;
t=s%2;
u=s/2;
v=u%2;
w=u/2;
x=w%2;
y=w/2;
z=y%2;
zz=y/2;
a2=zz%2;//
b2=zz/2;
c2=b2%2;//
d2=b2/2;
e2=d2%2;//
f2=d2/2;
g2=f2%2;//
h2=f2/2;
i2=h2%2;//
j2=h2/2;
k2=j2%2;//
l2=j2/2;
m2=l2%2;//
n2=l2/2;
cout<<a+10*c+100*e+1000*g+10000*i+100000*k+1000000*m+10000000*o+100000000*r+1000000000*t+10000000000*v+100000000000*x+1000000000000*z+10000000000000*a2+100000000000000*c2+1000000000000000*e2<<endl;
}
return 0;
}
#include
#include
#include
using namespace std;
int main(){
int a=0,b=0,c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m,n,o,p,r,s,t,u,v,w,x,y,z,zz,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,k2,l2,m2,n2,o2,q=0;
while(cin>>q){
a=q%2;
b=q/2;
c=b%2;
d=b/2;
e=d%2;
f=d/2;
g=f%2;
h=f/2;
i=h%2;
j=h/2;
k=j%2;
l=j/2;
m=l%2;
n=l/2;
o=n%2;
p=n/2;
r=p%2;
s=p/2;
t=s%2;
u=s/2;
v=u%2;
w=u/2;
x=w%2;
y=w/2;
z=y%2;
zz=y/2;
a2=zz%2;//
b2=zz/2;
c2=b2%2;//
d2=b2/2;
e2=d2%2;//
f2=d2/2;
g2=f2%2;//
h2=f2/2;
i2=h2%2;//
j2=h2/2;
k2=j2%2;//
l2=j2/2;
m2=l2%2;//
n2=l2/2;
cout<<a+10*c+100*e+1000*g+10000*i+100000*k+1000000*m+10000000*o+100000000*r+1000000000*t+10000000000*v+100000000000*x+1000000000000*z+10000000000000*a2+100000000000000*c2+1000000000000000*e2<<endl;
}
return 0;
}
太暴力了!!不建議這樣寫