Horje
phi function Code Example
phi function
int phi(int n) {
    int result = n;
    for (int i = 2; i * i <= n; i++) {
        if (n % i == 0) {
            while (n % i == 0)
                n /= i;
            result -= result / i;
        }
    }
    if (n > 1)
        result -= result / n;
    return result;
}




Cpp

Related
c++ execute thread and forget Code Example c++ execute thread and forget Code Example
nike Code Example nike Code Example
Chef and Races codechef solution in c++ Code Example Chef and Races codechef solution in c++ Code Example
how to set a variable to infinity in c++ Code Example how to set a variable to infinity in c++ Code Example
Stream Overloading Code Example Stream Overloading Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7