Given an array arr of N elements and a number K. Your task is to count the number of integers from 1 to K which are divisible by atleast one of the elements of arr.
First line of input consist of a single integer T denoting the total number of test case. Then T test cases follow. The first line of test case contains an integers N. Second line of test case contains N space separated integers denoting the array arr. Third line of test case contains an integer K.
For each test case output a single integer representing the solution to the given problem.
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.