LeetCode
Perfect Number
Click
here
for an explanation.