Dsa
Math
Easy
Perfect Number Checker
A perfect number is a positive integer that is equal to the sum of its proper positive divisors (excluding itself). Your task is to create a function that determines whether a given integer 'n' is a perfect number.
Input Format:
- A single line containing the integer 'n'.
Output Format:
- 'True' if 'n' is a perfect number, 'False' otherwise.
Example:
Input:
28
Output:
True
Key concepts
numberdivisorperfect
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now