about | help | code help+videos | done | prefs |
apcsaLoopsSumFactors
Given an int input, compute the sum of all the factors of the input. A factor of num is a number from 1 to num that num divides with no remainder, in other words: num % factor == 0. Note: When the sum of the factors is num+1, what does that mean you have found? Note: What is the interesting pattern when num is a power of 2?apcsaLoopsSumFactors(5) → 6 apcsaLoopsSumFactors(100) → 217 apcsaLoopsSumFactors(103) → 104 ...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: 150
Copyright Nick Parlante 2017 - privacy