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 1427 / 1513 800
Sieve of Eratosthenes 1336 / 1387 800
Segmented sieve 861 / 1116 800
Prime factors 957 / 1078 1000
Maximum GCD 818 / 915 1000
Divisors counting 832 / 882 1000
Largest common divisor 572 / 770 1100
Nearest Element 329 / 412 1200
Divisors counting 2 503 / 684 1200
GCD and LCM 483 / 495 1200
GGCD 406 / 422 1200
Square root sum 337 / 358 1200
Square number 424 / 575 1300
Sum sum sum 141 / 180 1500