Describe AnEasyProblem/정진경 here
Source Code ¶
n,a,b,c;main(){for(;a=scanf("%d",&n),n;){for(;!(a&n);a*=2);for(b=a;a&n;n^=a,a*=2);for(n|=a,c=1;!(a&b*2*c);c*=2)n|=c;printf("%d\n",n);}}
// 164K 0MS C 135B
n,a,b,c;main(){for(;a=scanf("%d",&n),n;){for(;!(a&n);a*=2);for(b=a;a&n;n^=a,a*=2);for(n|=a,c=1;!(a&b*2*c);c*=2)n|=c;printf("%d\n",n);}}