提交时间:2023-08-21 21:19:47
运行 ID: 99076
#include<iostream> using namespace std; int a, b, p, q, t, f; int main() { for (cin >> a >> b; a <= b; a++) { t = f = 0; int x{ a }; do (x & 1 ? t : f)++; while (x >>= 1); (t > f ? p : q)++; } cout << p << ' ' << q; return 0; }