→
C
hackerrank.com/tests/137q7ef02fc/questions/331hoq27128
GS Engineers Campus Hiring Program
Orķ
Paused R
011:09m
to test end
Raunak
Subsets of Os
Ashutosh is a very mischievous student. His mathematics teacher wants to teach him a lesson so, he gave Ashutosh an array of positive integers Arr[a1, a2 ...an] where ai>0. primeSum is an integer which is
equal to sum of all the prime factors of each element in Arr, modulus (10^6). Ashutosh's job is to find no of ways in which a set of 'primeSum' number of Os can be divided into k subsets modulus(10^9+7).
Ashutosh is a little nervous, can you help him get out of this trouble ?
Note: A subset can be empty
INPUT:
The first line indicates the number of subsets, k.
The next line has a single integer n denoting the length of array.
Next n lines contain the integers in the array,
19
Input Format for custom testing:
2 -> number of subsets, k
3 --> length of the array
3 --> length of the array for hackerrank representation of integer array followed by elements of the array
OUTPUT:
An integer representing the number of ways in which a set of primeSum number of Os can be divided into k subsets mod (10^9+7).
Constraints:
O<ai<=10^6
<= n <=1015
1<=K<=100
Type here to search
g
0135
^
ENO
19-08-2019
-20
ho
Answers
Answered by
12
Answer:
your question lack some information Plz clarify it first mate
Answered by
1
Answer:
your question is incomplete
missing some information
please edit the question and fill it
Similar questions