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 1120 / 1185 800
Sieve of Eratosthenes 1049 / 1082 800
Segmented sieve 666 / 880 800
Prime factors 756 / 858 1000
Maximum GCD 646 / 729 1000
Divisors counting 660 / 705 1000
Largest common divisor 460 / 618 1100
Nearest Element 258 / 332 1200
Divisors counting 2 397 / 557 1200
GCD and LCM 386 / 396 1200
GGCD 321 / 332 1200
Square root sum 244 / 260 1200
Square number 347 / 474 1300
Sum sum sum 96 / 131 1500