BETA

Difficulty Level: Easy

Total Submissions: 160 Accuracy:

32.5%

Euler Totient Function
       

Euler Totient Function (ETF) Φ(n) for an input n is count of numbers in {1, 2, 3, …, n} that are relatively prime to n, i.e., the numbers whose GCD (Greatest Common Divisor) with n is 1.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integer n.

Output:
Print the Euler Totient Function Φ(n) for an input n.

Constraints:
1<=T<=10^5
1<=N<=10^5

Example:
Input:

2
11
16

Output:
10
8

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Ayush Govil

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.