You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$21. \text{Given a positive integer \textcolor{green}{N}. Find the sum of all divisors of \textcolor{green}{N}.}$
$\text{Example: input: N = 6, output: 12}$
$\text{Explain:}$
$\text{The divisors of 6 are: 1, 2, 3, 6}$
$sum = 1 + 2 + 3 + 6 = 12$
References
Programming Exercises (Vietnamese: Bài tập kỹ thuật lập trình) - Author: Nguyễn Tấn Trần Minh Khang (My teacher at University (University of Sciences, HCM City))