2091: 找因数(2024年3月C++一级)

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:62 Solved:43

Description

小 A 最近刚刚学习了因数的概念,具体来说,如果一个正整数 a 可以被另一个正整数 b 整除,那么我们就说 b 是 a 的因数。
请你帮忙写一个程序,从小到大输出正整数 a 的所有因数。

Input

输入一行一个正整数 a 。 保证 a <= 1000。

Output

输出若干行,为 a 的所有约数,从小到大排列。

Sample Input Copy

6

Sample Output Copy

1
2
3
6

Source/Category