Ước số của n

View as PDF



Problem type
Allowed languages
C#, C++, Clang, Clang++, Cobol, D, Groovy, Haskell, Java, JS, Kotlin, Lua, Node JS, ObjectiveC, OCaml, Output, PHP, Prolog, Pypy, Pypy 3, Python, Ruby, Rust, Scala, Scratch, Swift
Points: 100 Time limit: 10.0s Memory limit: 640M Input: stdin Output: stdout

Viết chương trình nhập vào số nguyên \(n\) (\(n \le 10^7\)). In ra tất cả các ước số của \(n\). (Ước số của \(n\) là các số nguyên mà \(n\) chia hết)

Ví dụ: \(n=10\) thì in ra các số: \(1\ 2\ 5\ 10\)

Input

  • Một số nguyên dương \(n\).

Output

  • In ra các ước số của \(n\).

Example

Test 1

Input
10
Output
1 2 5 10

Test 2

Input
36
Output
1 2 3 4 6 9 12 18 36

Comments

There are no comments at the moment.