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.
Input
200 6 1 100 999999998 999999937
Output
divisors of 200: 1 2 4 5 8 10 20 25 40 50 100 200 divisors of 6: 1 2 3 6 divisors of 1: 1 divisors of 100: 1 2 4 5 10 20 25 50 100 divisors of 999999998: 1 2 691 1382 723589 1447178 499999999 999999998 divisors of 999999937: 1 999999937