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

PROGRAMMING:Improved version element decomposition

Luz5年前 (2021-05-10)题库364
Write function, output a positive integer version of the prime decomposition. The function of the main function is to input several positive integers (greater than 1) and output the upgraded prime factorization of each number. Prime factorization is to write integers into the product of several prime numbers (from small to large). The upgraded version of prime factorization means that integers are written as the product of several prime numbers (from small to large). Each prime number is output only once, followed by its power (the power of 1 is omitted and not output). See the output example for the specific format.
###Input example:
```in
1000 1001 1002 1003 1004 1005 1006 1007 1008
```
###Output example:
```out
1000=2^3*5^3
1001=7*11*13
1002=2*3*167
1003=17*59
1004=2^2*251
1005=3*5*67
1006=2*503
1007=19*53
1008=2^4*3^2*7
```







answer:If there is no answer, please comment