To check if num is perfect, find all proper divisors and sum them. If the sum equals num, return true.
Use the √num trick: loop from 1 to √num. For each divisor i, add both i and num/i to the sum (but exclude num itself).
Edge case: if i == √num (perfect square), do not add i twice. Also, never add num to the sum (it is not a proper divisor).