|
||||||||||
Problem C. CalculateTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 725 Accepted Submission(s): 285 Problem Description Given A, B, C, Calculate Where ¦Õ(n) denotes the number of positive integers ¡Ü n that are relatively prime to n. Input The first line of the input contains an integer T , denoting the number of test cases. In each test case, there are three integers A, B, C in one line, as described above. 1 ¡Ü T ¡Ü 10, 0 < A, B, C ¡Ü 10^7 Output For each test case, output one line contains a single integer, denoting the answer modulo 2^30. Sample Input
Sample Output
Source | ||||||||||
|