Problem Description
Loading...
Problem Analysis
An application of Euler’s Totient Function
Except that Euler’s Totient Function computes
the count of numbers in 1~N that are coprime with N
while this problem asks for the count of those that are not coprime
Actually, you just need to do a subtraction
Note that because of the data range and memory limit
this problem cannot be solved with a sieve
so just use the formula directly
cpp
| |
Problem link:【杭电】[1787]GCD Again