Number of Factors

All submissions for this problem are available.
Alice has learnt factorization recently. Bob doesn't think she has learnt it properly and hence he has decided to quiz her. Bob gives Alice a very large number and asks her to find out the number of factors of that number. To make it a little easier for her, he represents the number as a product of N numbers. Alice is frightened of big numbers and hence is asking you for help. Your task is simple. Given N numbers, you need to tell the number of distinct factors of the product of these N numbers.
Input:
First line of input contains a single integer T, the number of test cases.
Each test starts with a line containing a single integer N.
The next line consists of N space separated integers (A_{i}).
Output:
For each test case, output on a separate line the total number of factors of the product of given numbers.
Constraints:
1 ≤ T ≤ 100 1 ≤ N ≤ 10 2 ≤ A_{i} ≤ 1000000
Example:
Input:
3 3 3 5 7 3 2 4 6 2 5 5
Output:
8 10 3
Scoring:
You will be awarded 40 points for correctly solving for A_{i} ≤ 100.
You will be awarded another 30 points for correctly solving for A_{i} ≤ 10000.
The remaining 30 points will be awarded for correctly solving for A_{i} ≤ 1000000.
Author:  vamsi_kavala 
Tester:  rubanenko 
Editorial  http://discuss.codechef.com/problems/NUMFACT 
Tags  factorization, ltime01, simplemath, vamsi_kavala 
Date Added:  7062013 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 