#P17433. [LBA-OI R5 C] 卿即终解
[LBA-OI R5 C] 卿即终解
Background
::::align{center} 卿即终解,数证初心 ::::
In the final year of high school, Su Wan wrote three summation symbols and a greatest common divisor on scratch paper. Many years later, Lin Mo typed the code again and waited for the screen to output a number—that was an echo after eleven years.
Problem Description
Given , compute $\left(\sum\limits_{i=1}^{n}{\sum\limits_{j=1}^{n}{\sum\limits_{k=1}^{n}{i\cdot j\cdot k\cdot\gcd(i,j,k)}}}\right) \bmod 2^{64}$.
Input Format
This problem contains multiple test cases.
The first line contains an integer , representing the number of test cases.
The next lines each contain one integer .
Output Format
Output lines. Each line contains one integer, representing the answer.
5
1
2
51
1000
114514
1
35
3188479762
171666321110333776
14226039676014353747
Hint
Constraints for of the data: , .
::cute-table{tuack} | Test Point ID | | | | :---: | :---: | :---: | | | | | | | | | | | ^ | | | | ^ | | | | ^ | | | | ^ | |
Translated by ChatGPT 5