#include <bits/stdc++.h> using namespace std; int n, tot = 0; int main() { scanf("%d", &n); for (int i = 0; i <= n; ++i) { int tmp = i; while (tmp) { ++tot; tmp -= (tmp & -tmp); } } printf("%d\n", tot); }
tottottot 是什么,用大 OOO 表示法表示。