CF689E Mike and Geometry Problem
Description
Mike wants to prepare for IMO but he doesn't know geometry, so his teacher gave him an interesting geometry problem. Let's define $ f([l,r])=r-l+1 $ to be the number of integer points in the segment $ [l,r] $ with $ l
Input Format
The first line contains two integers $ n $ and $ k $ ( $ 1
Output Format
Print one integer number — the answer to Mike's problem modulo $ 1000000007 $ ( $ 10^{9}+7 $ ) in the only line.
Explanation/Hint
In the first example:
;
;
.
So the answer is $ 2+1+2=5 $ .