H8

Calculate the Euler totient function.

Input: A positive integer n, at most 108

Output: The number of positive integers at most n, which are relatively prime to n

Examples:

1  ->1
101->100
20 ->8

Languages, by Score

Languages, by Name


Back to Hole List

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License