Problems > Perfect Number > Editorial

Perfect Number — Solution & Editorial

Back to the Problem

Sum divisors in pairs (d, N/d) up to √N, starting the total at 1 and excluding N itself.

Complexity: O(√N)