All submissions for this problem are available.
Chef and Zoro were playing with a number. Chef asked Zoro a question to solve with his curiosity. The question is how many distinct numbers he can obtain if in the prime factorization of the original number he is allowed to perform infinite number of swaps between exponents of the adjacent prime factors. Formally if the prime factors are P1,P2,P3 ,.., Pn and the exponents are e1,e2,e3 ,..., en you are allowed to perform any swap for index i such that ei,ei+1 or ei,ei-1 can be swapped. Help Zoro answer the question to chef.
First line contains an integer T denoting the test cases.The single line of each test case denotes an integer number.
A single integer for each test case the number of ways.
- 1 ≤ T ≤ 100000
- 1 ≤ N ≤ 1000000
1 12 Output: 2
Number 12 can be written as 22*31 So if we swap 2 and 1 then we get another number as 18. So we get 2 distinct number 12 and 18.
|Time Limit:||- 1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, 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, kotlin, PERL6, TEXT, SCM chicken, CLOJ, COB, FS|
Fetching successful submissions