CF616E.Sum of Remainders

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

Calculate the value of the sum: nn mod 11 + nn mod 22 + nn mod 33 + ... + nn mod mm . As the result can be very large, you should print the value modulo 109+710^{9}+7 (the remainder when divided by 109+710^{9}+7 ).

The modulo operator aa mod bb stands for the remainder after dividing aa by bb . For example 1010 mod 33 = 11 .

输入格式

The only line contains two integers n,mn,m ( 1<=n,m<=10131<=n,m<=10^{13} ) — the parameters of the sum.

输出格式

Print integer ss — the value of the required sum modulo 109+710^{9}+7 .

输入输出样例

  • 输入#1

    3 4
    

    输出#1

    4
    
  • 输入#2

    4 4
    

    输出#2

    1
    
  • 输入#3

    1 1
    

    输出#3

    0
    
首页