提交时间:2024-08-19 21:50:42

运行 ID: 168017

#include <bits/stdc++.h> using namespace std; int type_A,type_B; int type0x86(int _n){ int _0 = 0,_1 = 0; while(_n > 0){ if(_n % 2 == 0) _0 ++; else _1 ++; _n /= 2; } return _0 < _1; } int main(){ for(int i = 1;i <= 1000;i ++) if(type0x86(i) == 1) type_A ++; else type_B ++; printf("%d %d",type_A,type_B); return 0; }