about | help | code help+videos | done | prefs |
A positive integer f is said to be a "factor" of positive integer n if dividing n by f leaves a remainder of zero. For example, 1, 2, 5, and 10 are the only factors of 10. 17 has only 2 factors, 1 and 17. 1 has only 1 factor, 1. Given a positive integer, return the number of factors it has. factorCount(10) → 4 factorCount(17) → 2 factorCount(-15) → 0 ...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: 200
Copyright Nick Parlante 2017 - privacy