17 lines
180 B
C
17 lines
180 B
C
|
#include <stdio.h>
|
||
|
|
||
|
int go(int n){
|
||
|
int count = 0;
|
||
|
while(n){
|
||
|
count ++;
|
||
|
n = (n-1) & n;
|
||
|
}
|
||
|
return count;
|
||
|
}
|
||
|
|
||
|
int main(){
|
||
|
int count = go(9);
|
||
|
printf("%d\n",count);
|
||
|
return 0;
|
||
|
}
|