Module Basic number theory

Basic number theory

**Frequency: 7/10**

Resources

- [USACO Guide: Divisibility](https://usaco.guide/gold/divisibility?lang=cpp) - [CP Algorithms: Sieve of Eratosthenes](https://cp-algorithms.com/algebra/sieve-of-eratosthenes.html)

Problems

Prime number 2 633 / 667 800
Sieve of Eratosthenes 581 / 604 800
Segmented sieve 331 / 497 800
Prime factors 416 / 479 1000
Maximum GCD 340 / 397 1000
Divisors counting 340 / 367 1000
Largest common divisor 232 / 327 1100
Nearest Element 121 / 162 1200
Divisors counting 2 206 / 306 1200
GCD and LCM 200 / 208 1200
GGCD 148 / 158 1200
Square root sum 30 / 35 1200
Square number 196 / 275 1300
Sum sum sum 6 / 9 1500