#P2260. [清华集训 2012] 模积和
[清华集训 2012] 模积和
Description
{{Compute
$$\sum_{i=1}^{n} \sum_{j=1}^{m} (n \bmod i) \times (m \bmod j), i \neq j$$the value modulo 19940417.}}
Input Format
{{The input contains a single line with two integers , .}}
Output Format
{{The answer modulo 19940417.}}
3 4
1
123456 654321
116430
Hint
{{Constraints
- For 10% of the testdata, it is guaranteed that .
- For 30% of the testdata, it is guaranteed that .
- For another 30% of the testdata, it is guaranteed that .
- For 100% of the testdata, it is guaranteed that .}}
Translated by ChatGPT 5
京公网安备 11011102002149号