binary increment by twobit

for(;a=readline();print(s)){r=1;s="";for(i=a.length;i-->0;r>>=1)s=(r+=a[i]*1)%2+s}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page