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.

I_give_up | 241 |

maggiiiii | 143 |

makeitdonesolo | 140 |

lost_found | 128 |

abhithakur588 | 119 |

Bishnu Dev Panda | 777 |

I_give_up | 552 |

okayboss | 551 |

yk12 | 514 |

makeitdonesolo | 480 |

blackshadows | 5331 |

Ibrahim Nash | 5219 |

akhayrutdinov | 5111 |

mb1973 | 4925 |

Quandray | 4547 |

Login to report an issue on this page.