Skip to main content

Practice · 2 of 5

Count the Divisors

CHALLENGE
Difficulty: intermediate+25 XP

**Description:** For each query n, print the number of positive divisors of n. **Input:** Line 1: t (1 <= t <= 10^5). Each of the next t lines: n (1 <= n <= 10^12). **Output:** t lines — the divisor counts. **Example:** 12 -> 6 (1, 2, 3, 4, 6, 12).

Back to lesson: Practice: Number Theory Problem Set