InterviewBit Academy is now Scaler!
InterviewBit Academy is now Scaler Academy!

Array and Prime Divisors

You are given an array A having N positive distinct integers and an integer B.
You have to find the number of prime divisors of B present in A.

Input Format

First argument given is an Array A, having N integers.
Second argument given is an integer B. 

Output Format

Return a single integer, i.e number of prime divisors of B present in A


1 <= N <= 1e4
1 <= A[i] <= 1e5
1 <= B <= 1e6

For Example

    A = [1, 2, 3, 4, 5]
    B = 6
	prime divisors of B in A are 2, 3
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a doubt? Checkout Sample Codes for more details.
Start solving Array and Prime Divisors on Interview Code Editor
Sign Up
to access hints and editorial solutions for Array and Prime Divisors


Click here to start solving coding interview questions