Description
Input
只有一行一个整数 N(0 < N < 1000000)。
Output
只有一行输出,为整数M,即f(1)到f(N)的累加和。
Sample Input
3
Sample Output
5
HINT
Source
Day2
傻逼题233
求
∑ni=1⌊ni⌋
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std;
int n,sum;
int main()
{
scanf("%d",&n);
for (int i=1;i<=n;i++) sum+=n/i;
cout<<sum;
}