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

PROGRAMMING:Pan's minimum factor sum problem

Luz5年前 (2021-05-10)题库353
Xiao pan is a handsome boy with active thinking. One day, he thought of a question:
For any integer m (M > = 2), we can write the equation M = 1 * A1 * A2... * an (n > = 1, A1 < = A2... < = an). Obviously, there may be many such expressions.
For example, 12 = 1 * 2 * 2 * 3, 12 = 1 * 2 * 6, 12 = 1 * 3 * 4, etc.
Now, he wants to know the smallest combination of these formulas, a1 + A2... + an. Please program to solve this problem.
###Input format:
The first line is an integer T, indicating that there are t groups of test cases.
Next, t lines, each with an integer M. 2<=M<=1000000。
###Output format:
For each group of test cases, output the formula satisfying the above questions in one line.
###Input sample 1:
```in
one
eighteen
```
###Output sample 1:
```out
18=1*2*3*3
```
###Input sample 2:
```in
two
two
nine
```
###Output sample 2:
```out
2=1*2
9=1*3*3
```






answer:If there is no answer, please comment