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

PROGRAMMING:Decomposition of large numbers

Luz5年前 (2021-05-10)题库378
Suppose you now have a positive integer $$n $$.
Each composite number can be written in the form of multiplication of several prime numbers, where each prime number is a factor of the composite number.
For positive integer $$n $$, you need to output the minimum number of prime factors in the prime factors decomposed by $$n $$.
Obviously, if $$n $$is a prime number, you only need to output $$1 $
###Input format:
The first line contains a positive integer $$t (1 / Leq T / Leq 50000)$$
Next, $$t $$line, enter a $$n for each line (2 / Leq n / Leq 10 ^ {18})$$
###Output format:
Total $$t $$lines
One integer per line
###Input example:
Here is a set of inputs. For example:
```in
two
twelve
sixty-four
```
###Output example:
The corresponding output is given here. For example:
```out
one
six
```
#####Example explanation:
$$12 = 2 \times 2 \times 3$$
$$2 $$appears for $$2 $$times and $$3 $$appears for $$1 $$times, so the minimum number of times the prime factor appears is $$1$$
$$64 = 2 \times 2 \times 2 \times 2 \times 2 \times 2$$
It can only be decomposed in this way, and in the decomposition result, $$2 $$appears $$6 $$times







answer:If there is no answer, please comment