Write a program to print in order all the divisors of a given number.
Input consists of several cases, each with a natural number between 1 and .
For every , print the divisors of in increasing order.
Your program must be “efficient” to be accepted by the judge.
You are not allowed to use vectors or alike.
Every divisor smaller than the square root of has a corresponding divisor greater than the square root of . It could be useful to make two loops, one for “small” divisors, and another for “large” divisors.
Author: Unknown
Translator: Salvador Roura
Generation: 2026-01-25T10:40:15.214Z
© Jutge.org, 2006–2026.
https://jutge.org