rename dir

This commit is contained in:
ranwenjie
2021-03-18 21:24:06 +08:00
parent 09d8a6131e
commit dcce9f67eb
138 changed files with 112 additions and 0 deletions
@@ -0,0 +1,18 @@
#include "stdio.h"
int one_appear_count_by_binary(int num){
int count = 0;
while(num !=0 ){
num &= num-1;
count++;
}
return count;
}
int main(int argc, char const *argv[])
{
int test = 10;
printf("%d\n", one_appear_count_by_binary(test));
printf("%d\n", one_appear_count_by_binary(32+1));
return 0;
}