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 1429 / 1515 800
Sieve of Eratosthenes 1338 / 1389 800
Segmented sieve 862 / 1117 800
Prime factors 959 / 1079 1000
Maximum GCD 820 / 918 1000
Divisors counting 834 / 884 1000
Largest common divisor 573 / 772 1100
Nearest Element 329 / 412 1200
Divisors counting 2 505 / 686 1200
GCD and LCM 484 / 496 1200
GGCD 407 / 423 1200
Square root sum 338 / 360 1200
Square number 424 / 575 1300
Sum sum sum 142 / 181 1500