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 899 / 955 800
Sieve of Eratosthenes 830 / 855 800
Segmented sieve 534 / 721 800
Prime factors 607 / 698 1000
Maximum GCD 524 / 593 1000
Divisors counting 524 / 561 1000
Largest common divisor 355 / 496 1100
Nearest Element 193 / 261 1200
Divisors counting 2 303 / 444 1200
GCD and LCM 295 / 305 1200
GGCD 238 / 247 1200
Square root sum 145 / 159 1200
Square number 275 / 386 1300
Sum sum sum 48 / 75 1500