Question: You are given three parameters: start(int), end(int) and list(of int);

Make a function that returns the amount of times all the numbers between **start** and **end** are multiples of the elements in the **list**.
example:

```
start = 15; end = 18; list = [2, 4, 3];
15 => 1 (is multiple of 3)
16 => 2 (is multiple of 2 and 4)
17 => 0
18 => 2 (is multiple of 2 and 3)
result = 5

```

The function should accept two positive integer numbers and an array of integers as parameters, returning the total integer number. Assume that start is less <= end.

examples: 

```
Multiple(1, 10, [1, 2]); => 15
Multiple(1, 800, [7, 8]); => 214
Multiple(301, 5000,[13, 5]); => 1301

```

The shortest solution is the victor!!! May he odds be ever in your favor...

Answer: 
[JavaScript (Node.js)](https://nodejs.org), 44 bytes
====================================================

```javascript
(a,x,y)=>a.map(n=>t+=y/n-(~-x/n|0)|0,t=0)&&t

```

[Try it online!](https://tio.run/##XcxBCoMwFATQfU/xV5LQH/OjDXUTL1K6CFZLiyZSQ1GQXj1NEbpwNgPDY572bafm9RiDcP7Wxs5EZnHGhZva5oMdmTN1OJpFOsE@YpZuJb4SBkM8y0JsvJt83@a9v7OOXRRCcUVIpYhz2CIlKH3YyTNCtcmK/jTJQp32VJUIOtmSkta08d9pGuIX "JavaScript (Node.js) – Try It Online")

---

[Python 2](https://docs.python.org/2/), 38 bytes
================================================

```python
lambda a,x,y:sum(y/i-~-x/i for i in a)

```

[Try it online!](https://tio.run/##RcxBCoMwFATQfU8x4CaBLyaxoVLwJG0XKSU0UKOoBbPx6umHgJ3NMPCYKa3vMZrs@3v@uOH5cnC0Ubou30GkJtR7vTUBfpwRECKczNMc4iq8uGmCeRC4tJISJRW0PR3kQugK6dRhKhh9/hvdEiyjVjGzqji@4Z1/ "Python 2 – Try It Online")

\$ \sum \_{i \in list} \lfloor \frac{end}{i} \rfloor - \lfloor \frac{start-1}{i} \rfloor \$

The answer seems trivial and naive. So am I misunderstand something?
[Perl 5](https://www.perl.org/) (`-ap`), 33 bytes
=================================================

```perl
for$i(<>..<>){$i%$_||$\++for@F}}{

```

[Try it online!](https://tio.run/##K0gtyjH9/z8tv0glU8PGTk/Pxk6zWiVTVSW@pkYlRlsbKOHgVltb/f@/obGCKZexgSGXqYGBwb/8gpLM/Lzi/7qJBQA "Perl 5 – Try It Online")