-->
当前位置:首页 > 题库

PROGRAMMING:Finding all factors of natural numbers

Luz5年前 (2021-05-10)题库412
Write a function to find out all factors of a natural number, so that the natural number is equal to the product of all factors except 1. If the number is prime, then the natural number is equal to itself. For example, 72 = 2 * 2 * 2 * 3 * 3.
###Input format:
Enter the natural number n (n < = 1000000000).
###Output format:
Output all factors of n. The output format is: n = A1 * A2 * A3 *... * am, A1, A2, A3,..., am is all factors of n.
###Input example:
Here is a set of inputs. For example:
```in
seventy-two
ninety-nine million eight hundred and eighty-seven thousand seven hundred and sixty-six
```
###Output example:
The corresponding output is given here. For example:
```out
72=2*2*2*3*3
99887766=2*3*11*31*48821
```







answer:If there is no answer, please comment