FLARIT - Floor Arithmetics
Given N, calculate
i.e. the sum of all N divided by i, rounded down, for all i from 1 to N.
Input
A positive integer N (N ≤ 10^12).
Output
The sum of all N divided by i, rounded down, for all i from 1 to N.
Example
Input: 4 Output: 8
Input: 10 Output: 27
Input: 32 Output: 119
Added by: | Emerson Leonardo Lucena |
Date: | 2017-12-13 |
Time limit: | 1s |
Source limit: | 10000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |