#P5572. [CmdOI2019] 简单的数论题
[CmdOI2019] 简单的数论题
Description
Given , find the value of the following expression:
$$\sum\limits_{i=1}^n\sum\limits_{j=1}^m \varphi\left(\dfrac{{\rm lcm}(i,j)}{\gcd(i,j)}\right) \bmod 23333$$Input Format
The first line contains an integer , which denotes the number of queries.
The next lines each contain two integers , representing one query.
Output Format
For each query, output one integer per line, which is the answer.
5
10 10
20 20
30 30
40 40
50 50
768
13312
16218
7160
9031
3
5 4
20 15
100 88
52
7572
21475
Hint
For all test cases, .
| Test Point ID | Time Limit | Special Property | ||
|---|---|---|---|---|
| #1~2 | ||||
| #3~4 | ||||
| #5~6 | ||||
| #7~8 | ||||
| #9~10 | ||||
Translated by ChatGPT 5
京公网安备 11011102002149号