← Problem book: Python
Lesson 39 of 96 · 10 XP
Divisors of a number
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
You are given n (n ≥ 1). Print all its divisors in ascending order on one line, separated by spaces.
Example
Input:
12
Output:
1 2 3 4 6 12
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.