budget. You build a positive integer n whose prime factorization (counting repeats) has at most budget factors.
Call a divisor of n **full** if it is divisible by every prime that appears in the factorization of n. For example, n = 12 = 2 · 2 · 3 has the full divisors 6 and 12, while 3 and 4 are not full.
Choose n to have as many full divisors as possible and return that count modulo 10⁹ + 7.budget=6 → 9
Take n = 2³ · 3³ = 216, which has six prime factors. A full divisor is 2ᵃ · 3ᵇ with 1 ≤ a ≤ 3 and 1 ≤ b ≤ 3, and there are 3 · 3 = 9 of them.
budget=4 → 4
For example n = 2² · 3² = 36 has the full divisors 6, 12, 18 and 36.
budget=1 → 1
n is a prime, and its only full divisor is n itself.
budget=6
9
Run checks the first 3 tests in your browser. Submit checks all 6 tests on the server, hidden ones included.