#Lutece1156. Dividing Numbers
Dividing Numbers
Migrated from Lutece 1156 Dividing Numbers
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
Given an integer () and () co-prime numbers , which are less than 1000. Please tell me how many integers in range satisfied that none of a number in can divide it.
Input
The first line contains two integers () and ().
The second line contains numbers . It is guaranteed that .
It is guaranteed that the given numbers are pairwise co-prime.
Output
Output an integer representing the number of integers in range satisfied the condition.
Samples
20 3
2 3 5
6
50 2
15 8
41
Resources
2015 UESTC ACM Summer Training Team Selection (4)