DDSA Solutions

Number Theory

14 problems

Number theory problems involve primes, divisors, GCD, modular arithmetic, and number bases. Key algorithms: Sieve of Eratosthenes (O(n log log n) primes), Euclidean GCD (O(log n)), and modular exponentiation (O(log n)). Most competitive problems use modulo 10⁹+7.