| about | help | code help+videos | done | prefs |
sumFactors
Given a positive integer n, compute the sum of all the divisors of n. For example, if n were 12, you'd return 28 since that is the sum 1 + 2 + 3 + 4 + 6 + 12. sumFactors(12) → 28 sumFactors(6) → 12 sumFactors(28) → 56 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 220
Copyright Nick Parlante 2017 - privacy