结论 数学
#include <iostream> using namespace std; const int N = 100010; int main() { int n; scanf("%d", &n); int res = 0; for (int i = 1; i <= n; i ++ ) res += n / i; printf("%d\n", res); return 0; }