| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 137551 | hjx5 | 二进制数问题 | C++ | Wrong Answer | 1 MS | 264 KB | 336 | 2025-11-19 15:14:36 |
#include <bits/stdc++.h> using namespace std; int main() { int i,j,a,b,s,s1; i=1; s=s1=0; while (i<=1000) { j=i; a=b=0; while (j!=0) { if (j%2==1) a=a+1; else b=b+1; j=j/2; } if (a>b and b!=0) s++; else if (b!=0) s1++; i++; } cout<<s<<" "<<s1<<endl; return 0; }
------Input------
0
------Answer-----
538 462
------Your output-----
529 462