Killjee and unique numbers

5

1 votes
Medium
Problem

Killjee has a list of 12 numbers and he wants to find how many unique numbers are there which are N. A number is said to be unque if it is divisible by any of number in Killjee's list.

INPUT CONSTRAINTS

  • 1N1018
  • 1 number in killjee's list 30

INPUT FORMAT

First line of input contains a single integer N, second line contains 12 space separated integers, number of Killjee's list.

OUTPUT FORMAT

Print answer to the problem.

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

80 numbers are <=100 and is divisible by any of 12 numbers.

Editor Image

?