Euler's Totient
Print φ(N): how many integers in [1, N] are coprime with N.
Input: one integer N.
Output: φ(N).
Constraints:
- 1 ≤ N ≤ 1012
Sample Tests
Input 1
9
Output 1
6
Input 2
1
Output 2
1
Discussion (opens after you solve — no spoilers before)
No comments yet.