Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- num = int(input())
- def solve(n):
- sum_div = 0
- for i in range(1, n):
- if n % i == 0:
- sum_div += i
- return f"We have a perfect number!" if sum_div == n else "It's not so perfect."
- print(solve(num))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement