Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 688 Bytes

Question.md

File metadata and controls

25 lines (17 loc) · 688 Bytes

Question: Perfect Number

Difficulty Level: 🟢 Beginner
Domain: Programming Languages (Any Language)

Description:
A perfect number is a positive integer that is equal to the sum of its positive divisors, excluding the number itself. A divisor of an integer x is any integer that can divide x evenly.

Input Example:

num = 28

Output Example:

True

Instructions:

  1. Implement a function that checks if a given integer n is a perfect number.
  2. A perfect number is equal to the sum of all its divisors excluding itself.
  3. Return True if the number is perfect, otherwise return False.