시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
7 초 | 512 MB | 35 | 18 | 7 | 36.842% |
Are you sick of solving problems like computing the prefix sum of a random number theory function? As a terrible problem writer, here I present another one for you.
Compute
\[\sum_{x=1}^{n}{\text{lcm}(x, x+1, \dots, x+k)}\text{.}\]
The answer can be large, so output it modulo 109 + 7.
The first line contains two integers n, k (1 ≤ n ≤ 1018, 0 ≤ k ≤ 30).
Output one integer: the answer.
10 3
18936
10000 6
43482752
1000000000 15
688102997