GoLang Solution For LeetCode Problem: Perfect Number
Solving Perfect Number in go. Please try yourself first to solve the problem and submit your implementation to LeetCode before looking into solution.
Problem Description
Now, given an
integer
n, write a function that returns true when it is a perfect number and false when it is not.
Example:
Input: 28
Output: True
Explanation: 28 = 1 + 2 + 4 + 7 + 14
See the full details of the problem Perfect Number at LeetCode
Originally posted at: @github.com/halfrost/LeetCode-Go
Comments
Leave a comment
You are not LoggedIn but you can comment as an anonymous user which requires manual approval. For better experience please Login.