Little Shino and Number of Divisors
Practice
4.1 (32 votes)
Mathematics
Medium
Number theory
Problem
94% Success 14731 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

You are given an integer array A of size x denoting the prime powers of an integer N. Ai denotes the power of ith prime in the prime factorization of N. To make it more clear, A1 will denote the power of 2 in the prime factorization of N, A2 will denote the power of 3 in the prime factorization of N and so on.

Consider a number P equals to the product of all the divisors of N. You have to find the number of divisors of P. Output it modulo 109+7.

enter image description here

Input Format:
The first line contains an integer, x (1x106) denoting the size of array A. Next line contains x space separated integers, denoting the array A (0Ai109).

Output Format:
Print one integer, denoting the number of divisors of P, modulo 109+7.

Sample Input
3
1 1 1
Sample Output
125
Explanation

N=213151=30

P=12356101530=810000

Number of factors of P is 125

Code Editor

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Submissions
Please login to view your submissions
Similar Problems
Points:30
Tags:
Binary SearchModular exponentiationSieveMedium
Points:30
38 votes
Tags:
Modular ExponentiationMediumMatrix ExponentiationNumber TheoryMathematics
Points:30
Tags:
Medium
Editorial

Login to unlock the editorial