| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158134 | 林睿 | 二进制数问题 | C++ | Accepted | 1 MS | 264 KB | 408 | 2026-08-20 16:38:40 |
#include <iostream> using namespace std; int main() { int A = 0, B = 0; for(int n = 1; n <= 1000; n++) { int cnt1 = 0, cnt0 = 0; int x = n; while(x > 0) { if(x & 1) cnt1++; else cnt0++; x >>= 1; } if(cnt1 > cnt0) A++; else B++; } cout << A << " " << B << endl; return 0; }