bqi343 / cp-notebook

General Resources for Competitive Programming
Creative Commons Zero v1.0 Universal
2.39k stars 416 forks source link

Euler Totient #10

Closed parthgpta closed 4 years ago

parthgpta commented 4 years ago

Euler's totient function, also known as phi-function ϕ(n), counts the number of integers between 1 and n inclusive, which are coprime to n. Two numbers are coprime if their greatest common divisor equals 1 (1 is considered to be coprime to any number).

bqi343 commented 4 years ago

It's already a part of https://github.com/bqi343/USACO/blob/master/Implementations/11%20-%20Math%20(4)/Number%20Theory/Basic%20Factoring.cpp.

but thanks anyways for the suggestion :)