#P7505. [2017年杭电多校]Euler theorem
[2017年杭电多校]Euler theorem
Euler theorem
Problem Description
HazelFan is given two positive integers £¬ and he wants to calculate . But now he forgets the value of and only remember the value of , please tell him the number of different possible results.
Input
The first line contains a positive integer , denoting the number of test cases. For each test case: A single line contains a positive integer .
Output
For each test case: A single line contains a nonnegative integer, denoting the answer.
Sample Input
2
1
3
Sample Output
2
3
Source
2017 Multi-University Training Contest - Team 7