← All problemsSign in

Divisor Analysis

CSESMathematicsOpen on judge ↗

Given an integer, your task is to find the number, sum and product of its divisors. As an example, let us consider the number 12: - the number of divisors is 6 (they are 1, 2, 3, 4, 6, 12) - the sum of divisors is 1+2+3+4+6+12=28 - the product of divisors is 1 \cdot 2 \cdot 3 \cdot 4 \cdot 6 \cdot 12 = 1728 Since the input number may be large, it is given as a prime factorization. Input The

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start