TopCoder

User's AC Ratio

100.0% (4/4)

Submission's AC Ratio

71.4% (5/7)

Tags

Description

Given $Q$ cases. For each case, given integer $a_ i$. Please factorize it.

Input Format

$Q$
$a_ 0$
$a_ 1$
:
$a_ {Q - 1}$

Output Format

Print $Q$ lines. For each line, print as follows. $k$ is the number of factors and $x_ i$ is the factors in ascending order.
$k$ $x_ 0$ $x_ 1$ ... $x_ {k - 1}$

Sample Input 1

10
1
2
3
4
5
6
7
8
9
10

Sample Output 1

0
1 2
1 3
2 2 2
1 5
2 2 3
1 7
3 2 2 2
2 3 3
2 2 5

Hints

  • $1 \leq Q \leq 100$
  • $1 \leq a_ i \leq 10^ {18}$

Subtasks

No. Testdata Range Score

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 10000 2097152 2097152
1 10000 2097152 2097152
2 10000 2097152 2097152
3 10000 2097152 2097152
4 10000 2097152 2097152
5 10000 2097152 2097152
6 10000 2097152 2097152
7 10000 2097152 2097152
8 10000 2097152 2097152
9 10000 2097152 2097152
10 10000 2097152 2097152
11 10000 2097152 2097152
12 10000 2097152 2097152
13 10000 2097152 2097152
14 10000 2097152 2097152
15 10000 2097152 2097152
16 10000 2097152 2097152
17 10000 2097152 2097152
18 10000 2097152 2097152
19 10000 2097152 2097152
20 10000 2097152 2097152
21 10000 2097152 2097152
22 10000 2097152 2097152
23 10000 2097152 2097152
24 10000 2097152 2097152
25 10000 2097152 2097152
26 10000 2097152 2097152
27 10000 2097152 2097152
28 10000 2097152 2097152
29 10000 2097152 2097152
30 10000 2097152 2097152