| about | help | code help+videos | done | prefs |
Given an integer n, return a list of all the perfect numbers less than n. A perfect number is one whose proper divisors (not including the number itself) sum to the number. For example, 6 is perfect because its proper divisors are [1, 2, 3], and 1+2+3 == 6. perfects(5) → [] perfects(10) → [6] perfects(27) → [6] ...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: 251 Post-solution available
Copyright Nick Parlante 2017 - privacy