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.

saiujwal13083 | 347 |

isiddhisingh | 252 |

Abhishek_Jadhav | 243 |

_uncle_sam_ | 221 |

c_ocoooo | 217 |

saiujwal13083 | 610 |

SumitSingh27 | 466 |

c_ocoooo | 456 |

rathiarpit29 | 379 |

NaveenKumarNakka | 370 |

blackshadows | 5362 |

Ibrahim Nash | 5242 |

akhayrutdinov | 5111 |

mb1973 | 4931 |

Quandray | 4598 |

Login to report an issue on this page.