Run ID Author Problem Lang Verdict Score Time Memory Code Length Submit Time
168198 A班-陆泽铭 二进制数分类 C++ Accepted 100 1 MS 248 KB 310 2024-08-19 23:53:59

Tests(4/4):


#include<iostream> using namespace std; int main() { long long 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; }


Judgement Protocol: