A10253. Sum of Remainders
编程题
普及/提高-
知识点
题目描述
Calculate the value of the sum: $n$ mod $1$ + $n$ mod $2$ + $n$ mod $3$ + ... + $n$ mod $m$ . As the result can be very large, you should print the value modulo $10^{9}+7$ (the remainder when divided by $10^{9}+7$ ).
The modulo operator $a$ mod $b$ stands for the remainder after dividing $a$ by $b$ . For example $10$ mod $3$ = $1$ .
The modulo operator $a$ mod $b$ stands for the remainder after dividing $a$ by $b$ . For example $10$ mod $3$ = $1$ .
输入格式
The only line contains two integers $n,m$ ( $1<=n,m<=10^{13}$ ) — the parameters of the sum.
输出格式
Print integer $s$ — the value of the required sum modulo $10^{9}+7$ .
输入输出样例
输入 #1
3 4
输出 #1
4
输入 #2
4 4
输出 #2
1
输入 #3
1 1
输出 #3
0