CSES - Sum of Divisors

Xem dạng PDF

Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 512M
Input: stdin
Output: stdout

Nguồn bài:
https://cses.fi/problemset/task/1082
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

Let ~\sigma(n)~ denote the sum of divisors of an integer ~n~. For example, ~\sigma(12)=1+2+3+4+6+12=28~.

Your task is to calculate the sum ~\sum\_{i=1}^n \sigma(i)~ modulo ~10^9+7~.

Input

  • The only input line has an integer ~n~.

Output

  • Print ~\sum\_{i=1}^n \sigma(i)~ modulo ~10^9+7~.

Constraints

  • ~1 \le n \le 10^{12}~

Example Input

5

Example Output

21

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.