Given a number **n**, find the ordered prime signatures and find the number of divisor of **n**.

Any positive integer, ‘n’ can be expressed in the form of its prime factors. If ‘n’ has p_{1}, p_{2}, … etc. as its prime factors, then n can be expressed as :

Arrange the obtained exponents of the prime factors of ‘n’ in non-decreasing order. The arrangement thus obtained is called the **ordered prime signature** of the positive integer ‘n’.

**Input:**

The first line contains an integer **T, **the number of test cases. For each test case, there is an integer **n.**

**Output:**

For each test case, the output is ordered prime signature and in next line, the total number of divisor of **n.**

**Constraints:**

1<=T<=100

2<=n<=10^6

**Example:
Input**

2

20

13

1 2

6

1

2

**Explanation**

1. ordered prime signature of 20 = { 1, 2 } and divisor are 1,2,4,5,10,20 i.e. 6.

2. **13=13**^{1}^{ }, ordered prime signature of 13 is {1} and divisor are 1 & 13 i.e. 2

Author: Vanshika_pec

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

SashaV | 220 |

VivSisMMM | 216 |

GustavoMéndez | 210 |

GHJKL | 196 |

d_Coder00 | 189 |

Pulkit__Sharma__ | 742 |

Anirban166 | 677 |

Found_me | 598 |

abducodes | 590 |

Sathvik Avasarala | 518 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4559 |

Login to report an issue on this page.