Perfect Numbers Up To N
PROIteration & LoopsNested Loops
MOD
Algorithms
A **perfect number** is a positive integer that equals the sum of its proper divisors (all the positive divisors that are smaller than the number itself). For example, 6 is perfect because 1 + 2 + 3 = 6.
Write a program that inputs an integer `N` and outputs every perfect number from 2 to `N` inclusive, one per line, in ascending order. If there are none, output `None`.
Example Input
30
Example Output
6
28
0% (0 passed / 0 attempted)