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 1411 / 1495 800
Sieve of Eratosthenes 1314 / 1367 800
Segmented sieve 842 / 1096 800
Prime factors 941 / 1058 1000
Maximum GCD 800 / 897 1000
Divisors counting 816 / 865 1000
Largest common divisor 561 / 754 1100
Nearest Element 322 / 405 1200
Divisors counting 2 495 / 674 1200
GCD and LCM 475 / 488 1200
GGCD 400 / 415 1200
Square root sum 329 / 350 1200
Square number 417 / 565 1300
Sum sum sum 137 / 176 1500