Sign InCreate Account

Upgrade to Pro

Upgrade Now

Coding Workspace

EditorProjectsPractice QuestionsTimed Mock ExamsFlowcharts

PseudoEditor AI

Pseudocode TutorCode GeneratorCode FixerCode Converter
Back to Problems
PreviousNext

Sign in to run tests against edge cases and save your code automatically.

Problem Description

Hard

Perfect Numbers Up To N

PROIteration & Loops
Nested Loops
MOD
Algorithms

A **perfect number** is a positive integer that equals the sum of its proper divisors (all the positive divisors that are smaller than the number itself). For example, 6 is perfect because 1 + 2 + 3 = 6. Write a program that inputs an integer `N` and outputs every perfect number from 2 to `N` inclusive, one per line, in ascending order. If there are none, output `None`.

Example Input

30

Example Output

6 28

Success Rate:

0% (0 passed / 0 attempted)

Code

Draft auto-saved

Test Results

Click "Test Code" to evaluate your code against the tests.

Product

For SchoolsOverviewFeaturesFAQ
PseudoEditor

© 2026 PseudoEditor. All rights reserved.