|
||||||||||
FunctionTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1439 Accepted Submission(s): 375 Problem Description Jerry is fond of functions. He thinks the mystery of the universe is hidden behind the notations, variables and numbers. Of all functions, he thinks $\gcd$ and $\lfloor x\rfloor$ are the most fascinating, and that something combines gcd with truncation should be even more marvelous. Therefore, he comes up with a problem: calculate Input The input contains several test cases. The first line contains an integer $T(1\le T\le 11)$, the number of test cases. Each of the next $T$ lines contains a integer $n(1\le n\le 10^{21})$, indicating a query. Output For each test case, output one line containing an integer indicating the corresponding answer. Sample Input
Sample Output
Hint g++ compiler on HDOJ supports __int128. And you may need the following function:
Source | ||||||||||
|