BETA
School Problem's Submission isn't counted in score!

Total Submissions: 1374 Accuracy:

52.91%

All divisors of a natural number
     

Given a natural number n, print all distinct divisors of it including 1 and the number itself.

Input:
The first line of input contains an integer T denoting the number of test cases. The first line of each test case is N, N is the number whose divisors are to be printed.

Output:
All the divisors of the given number including 1 and the number itself are displayed in a line with a single space between them in an increasing order.

Constraints:
1 <= T <= 30
1 <= N <= 100000

Example:
Input:

3
100
10
125

Output:
1 2 4 5 10 20 25 50 100
1 2 5 10
1 5 25 125

** For More Input/Output Examples Use 'Expected Output' option **

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.