Easy · Math & Number Theory · about 5 minutes
Asked at Google, Amazon, Microsoft, Bloomberg.
A perfect number equals the sum of its positive divisors excluding itself (like 28 = 1 + 2 + 4 + 7 + 14). Return true if num is perfect.
num