Company: MediaNet_8oct
Difficulty: medium
Omega Prime Subsets Call a positive integer X an Omega Prime when no perfect square Y > 1 divides it. In other words, no prime appears twice in the factorisation of X . For example, 10 = 2 * 5 is an Omega Prime, while 18 = 2 * 3 * 3 is not, because 9 divides it. The number 1 is an Omega Prime, since no square greater than 1 divides it. You are given an array A of n integers. Count the non-empty subsets of A whose product is an Omega Prime. Subsets are chosen by index, so equal values at different positions give different subsets. Return the count modulo 10^9 + 7 . Function description Complete the function findOmegas with the following parameter: int A[n] : the array Returns int : the number of non-empty subsets of A whose product is an Omega Prime, modulo 10^9 + 7 . Input format The first line contains the integer n . The second line contains n integers: A[0], A[1], ..., A[n-1] . (inferred -- the source passes A as a function argument; this is the stdin layout read by the code temp