Run ID:163501

提交时间:2026-10-25 14:57:17

#include <bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,t; for(int i=1;i<=1000;i++){ t=i; int y=0,l=0; while(t>0){ if(t%2==1) y++; else l++; t/=2; } if(y>l) a++; else if(y<=l) b++; } cout<<a<<" "<<b; return 0; }