Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
502 | 张宸瑞 | 二进制数问题 | C++ | Wrong Answer | 0 MS | 252 KB | 479 | 2022-08-27 16:22:45 |
#include <iostream> #include <cmath> using namespace std; int main() { int A=0,B=0,l=0,y=0,i; for(i=1;i<=1000;i++){ int max=i; while(max!=0){ if(i%2==1){ y++; } else{ l++; } max/=2; } if(y>l){ A++; } else{ B++; } y=0,l=0; } cout<<A<<" "<<B; return 0; }
------Input------
0
------Answer-----
538 462
------Your output-----
500 500