#K46252. Find Divisors
Find Divisors
Find Divisors
Given a positive integer \( n \), your task is to compute all of its divisors and output them in ascending order. A divisor \( d \) of \( n \) is an integer such that \( d \mid n \) (i.e. there exists an integer \( k \) with \( n = d \times k \)).
You will be provided with a single positive integer via standard input. Print all divisors separated by a single space to standard output.
inputFormat
The input consists of a single line containing one positive integer ( n ).
outputFormat
Output a single line containing all the divisors of ( n ) in ascending order, separated by a single space.## sample
12
1 2 3 4 6 12