report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Sum of remainders - MarisaOJ: Marisa Online Judge

Sum of remainders

Time limit: 1000 ms
Memory limit: 256 MB
Given integers $n, m$, calculate $\sum_{i=1} ^{m} n \mod i$. ### Input - Contains 2 integers $1 \le n, m \le 10^{13}$. ### Output - Print the answer modulo $10^9+7$. ### Constraints - $1 \le n, m \le 10^{13}.$ ### Example Input: ``` 3 4 ``` Output: ``` 4 ```
Number theory
The 666-th problem
Sum of remainders
Fibonacci 3
GCD Subsets
Topic
Math
Rating 1800
Solution (1) Solution