Perfect Numbers
Statement
Goal
A perfect number is a number where the sum of all the proper factors (factors which are not the number itself) is equal to the number itself.You are given a number N and your program must output
Input
Line 1: N, the number you must check whether it's perfect or not
Output
Line 1: perfect or not perfect depending on if the number is perfect or not
Constraints
1 ≤ N ≤ 10^4
Example
Input
11
Output
not perfect
Game modes
Fastest, Shortest
Test cases
Test 1 Test
Input
11
Output
not perfect
Validator 1 Validator
Input
10
Output
not perfect
Test 2 Test
Input
5
Output
not perfect
Validator 2 Validator
Input
6
Output
perfect
Test 3 Test
Input
28
Output
perfect
Validator 3 Validator
Input
23
Output
not perfect
Test 4 Test
Input
496
Output
perfect
Validator 4 Validator
Input
497
Output
not perfect
Solution language
Solution
Stub generator input