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 1128 / 1192 800
Sieve of Eratosthenes 1054 / 1088 800
Segmented sieve 670 / 883 800
Prime factors 763 / 866 1000
Maximum GCD 649 / 734 1000
Divisors counting 664 / 709 1000
Largest common divisor 462 / 623 1100
Nearest Element 261 / 335 1200
Divisors counting 2 398 / 559 1200
GCD and LCM 389 / 399 1200
GGCD 322 / 333 1200
Square root sum 246 / 263 1200
Square number 349 / 477 1300
Sum sum sum 98 / 132 1500