#P2261. Sum of Remainders
Sum of Remainders
Sum of Remainders
Given two positive integers n and k, calculate
$$G(n, k) = \sum_{i=1}^{n} k \bmod i$$where \(k \bmod i\) denotes the remainder when k is divided by i. Output the result.
inputFormat
The input consists of a single line containing two positive integers n and k separated by a space.
outputFormat
Output a single integer representing the value of $$G(n, k) = \sum_{i=1}^{n} k \bmod i$$.
sample
1 5
0