Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
88357 sh25_ganzy 二进制分类 C++ 通过 0 MS 236 KB 372 2026-05-10 16:30:49

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int main(){ int A=0,B=0; for(int i=1;i<=1000;i++){ int num=i; int cnt1=0,cnt0=0; while(num>0){ if(num%2==1) cnt1++; else cnt0++; num/=2; } if(cnt1>cnt0) A++; else B++; } cout<<A<< " " <<B<<endl; return 0; }


测评信息: