提交时间:2022-05-15 09:55:57

运行 ID: 217

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