| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 167605 | C班-赵奕博 | 二进制数分类 | C++ | Accepted | 100 | 1 MS | 248 KB | 434 | 2024-08-19 17:00:03 |
#include <bits/stdc++.h> using namespace std; int main(){ int i,a,b,mod,t1=0,t2=0,x,y; cin>>x>>y; for(; x<=y; x++) { i=x,a=0,b=0; while(i) { mod=i%2; i>>=1; if(mod) a++; else b++; } if(a>b) t1++; else t2++; } cout<<t1<<' '<<t2; return 0; }