Divisibility of numbers Challenge
HP is doing research in mathematics . After doing lots of research, she struck in a problem . She found four numbers n,a, b and c .Now, She wants to know how many number exists which are less than or equal to n and are divisible by a ,b or c .
Input :
4 integers denoting n,a,b and c separated by space
Output :
intger which denotes the count of the numbers which are divisible a,b,c
Scoring:
This is code-golf, shortest code in bytes wins.
Python 2, 72 65 bytes

Note: This solution works for positive integers:



lambda a,b,c,n:len([x for x in range(1,n+1)if x%a*(x%b)*(x%c)&lt;1])


Try it online!