Given an array with N elements, the task is to find the count of factors of a number X which is product of all array elements.

**Input:**

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of two lines. First line of each test case contains an Integer N denoting size of array and the second line contains N space separated elements.

**Output:**

For each test case, print the count of factors of X in new line.

**Constraints:**

1<=T<=100

1<=N<=100

1<=A[i]<=100

**Example:
Input:**

2

3

2 4 6

3

3 5 7

**Output:**

10

8

**Explanation:**

```
Input : 2 4 6
Output : 10
2 * 4 * 6 = 48, the factors of 48 are
1, 2, 3, 4, 6, 8, 12, 16, 24, 48 whose count is 10.
Input : 3 5 7
Output : 8
3 * 5 * 7 = 105, the factors of 105 are
1, 3, 5, 7, 15, 21, 35, 105 whose count is 8.
```

Author: arun03

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.

msriramvarma01 | 25 |

AbhilashKumar2 | 24 |

monusinghal | 24 |

tripurari_IT | 24 |

Abreez Das | 23 |

ARUN_PUNDIR | 609 |

manishgupta8497 | 607 |

KhyatiSoneji | 501 |

Abhimanyu_kumar | 487 |

vvggfggcg | 453 |

blackshadows | 5333 |

Ibrahim Nash | 5221 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.