|
||||||||||
GCD MagicTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 575 Accepted Submission(s): 172 Problem Description Z is learning GCD theory and he finds a difficult problem: $$ \sum_{i=1}^{n}\sum_{j=1}^{n}[\gcd(2^i-1,2^j-1)]^K $$ He doesn't know how to solve it, but he knows it's easy for you. Please help him. Since the answer can be very large, you only need to print the answer $\text{mod}\ 998244353$. Input The first line contains one integer $T\ (1\le T\le 12)$ which represents the number of test cases. For each test case: One line contains two integers $n\ (1\le n\le 10^9)$ and $K\ (0\le K\le 10)$. Output For each test case: Print one line containing one integer which represents the answer. Sample Input
Sample Output
Source | ||||||||||
|