CF616E.Sum of Remainders
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
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 109+7 (the remainder when divided by 109+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<=1013 ) — the parameters of the sum.
输出格式
Print integer s — the value of the required sum modulo 109+7 .
输入输出样例
输入#1
3 4
输出#1
4
输入#2
4 4
输出#2
1
输入#3
1 1
输出#3
0