Sum of Remainders

题意翻译

## 题目描述 计算以下式子的和:$n \bmod 1 + n \bmod 2 + n \bmod 3 + \dots + n \bmod m$。由于结果可能很大,你需要输出其对 $10^9+7$ 取模的结果。 ## 输入输出格式 **输入格式:** 一行两个整数 $n,m(1 \leq n,m \leq 10^{13})$。 **输出格式:** 输出整数 $s$,表示结果对 $10^9+7$ 取模的结果。

题目描述

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 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