题解
2025-07-02 15:36:35
发布于:四川
16阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int c[110];
int main(){
int n,sum=0;
cin >> n;
while(n){
if(n%2==1){
sum+=1;
}
n/=2;
}
cout << sum ;
return 0;
}
全部评论 4
china no.1
2025-07-23 来自 四川
12025-07-23 来自 四川
1很不错
2025-07-23 来自 四川
12025-07-24 来自 四川
0
有帮助,赞一个