U E D R , A S I H C RSS

데블스캠프2009/금요일/연습문제/ACM2453/김홍기 (rev. 1.1)

데블스캠프2009/금요일/연습문제/ACM2453/김홍기

Describe 데블스캠프2009/금요일/연습문제/ACM2453/김홍기 here
int b(n){int a=0;for(;;n/=2){if(n%2)a++;if(!n)break;}return a;}main(i,n){for(;;){scanf("%d",&n);if(!n)break;for(i=n+1;b(n)!=b(i);i++);printf("%d\n",i);}}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:29:08
Processing time 0.0195 sec