Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
79621 sh25_zhuhy 1的个数 C++ 通过 0 MS 252 KB 197 2026-01-04 14:32:21

Tests(2/2):


#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int s=0; while(n!=0){ if(n%2==1) s=1+s; n=n/2; } cout<<s; return 0; }


测评信息: