| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 168194 | A班-陆泽铭 | 二进制数分类 | C++ | Accepted | 100 | 0 MS | 240 KB | 304 | 2024-08-19 23:52:13 |
#include<iostream> using namespace std; int main() { int x,y,a=0,b=0,c=0,z1=0,z2=0; cin>>x>>y; for(int i=x;i<=y;i++) { a=0; b=0; c=i; while(c>0) { if(c%2==1) a++; else b++; c=c/2; } if(a>b) z1++; else z2++; } cout<<z1<<" "<<z2; }