#abc230e. E - Fraction Floor Sum
E - Fraction Floor Sum
Score : points
问题描述
已知正整数 。求 $\displaystyle\sum_{i=1}^N \left[ \frac{N}{i} \right]$ 的值。
这里,对于一个实数 , 表示不超过 的最大整数。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Given is a positive integer . Find the value $\displaystyle\sum_{i=1}^N \left[ \frac{N}{i} \right]$.
Here, for a real number , denotes the largest integer not exceeding .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
3
Sample Output 1
5
We have $\left[ \frac{3}{1} \right]+\left[ \frac{3}{2} \right]+\left[ \frac{3}{3} \right]=3+1+1=5$.
Sample Input 2
10000000000
Sample Output 2
231802823220
Note that the input and output may not fit into a -bit integer type.
update @ 2024/3/10 10:03:41