Run ID:162669

提交时间:2026-10-18 13:08:20

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