luogu#P4240. 毒瘤之神的考验
毒瘤之神的考验
Background
At Salamander's doorstep lies a long road.
As spring approaches again, Salamander discovers a row of "duliu" growing by the roadside!
Salamander wants to take some "duliu" home, but then a God of "Duliu" pops out from among them!
God of "Duliu": Do you want to take the "duliu"? If you want to take them, you must answer my question! If you can't answer it, you'd better go home!
Problem Description
The God of "Duliu" will ask times. Each time, given , Salamander must answer $\left( \sum_{i=1}^n \sum_{j=1}^m \varphi(ij) \right)\! \bmod 998244353$.
Salamander cannot solve it, so he passes the problem to you.
Input Format
The first line contains a positive integer .
Then follow lines; each line contains two positive integers separated by a space, representing this query's .
Output Format
Output lines, each containing one integer representing the answer.
3
1 1
2 2
3 3
1
5
19
Hint
For of the testdata, , .
For of the testdata, , .
For another of the testdata, , .
For of the testdata, , .
Translated by ChatGPT 5