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. \(A_i\) denotes the power of \(i^{th}\) prime in the prime factorization of N. To make it more clear, \(A_1\) will denote the power of 2 in the prime factorization of N, \(A_2\) 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 \(10^9 + 7\).

enter image description here

Input Format:
The first line contains an integer, x (\(1 \le x \le 10^6\)) denoting the size of array A. Next line contains x space separated integers, denoting the array A (\(0 \le A_i \le 10^9\)).

Output Format:
Print one integer, denoting the number of divisors of P, modulo \(10^9 + 7\).

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
1 votes
Tags:
Modular exponentiationMediumMath
Points:30
Tags:
Binary SearchModular exponentiationSieveMedium
Points:30
Tags:
Medium