Question:

Write a function that returns 1 if the given number is a perfect number, returns 0 otherwise.

A perfect number is a number that is equal to the sum of its positive divisors except itself.

example :

input  output

2         0 

6         1

28       1

15       0