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 1061 / 1122 800
Sieve of Eratosthenes 986 / 1016 800
Segmented sieve 637 / 839 800
Prime factors 725 / 827 1000
Maximum GCD 617 / 699 1000
Divisors counting 630 / 675 1000
Largest common divisor 432 / 587 1100
Nearest Element 243 / 315 1200
Divisors counting 2 377 / 537 1200
GCD and LCM 365 / 376 1200
GGCD 300 / 311 1200
Square root sum 220 / 236 1200
Square number 331 / 454 1300
Sum sum sum 83 / 116 1500