Problem E
Hljóðstilling
Languages
en
is

SARA: “Music right?”
HANNES: “Yeeea!”
ARNAR: “Hey Google! Play Despacito!”
Hannes corrects the volume quickly.
SARA: “HOW DARE YOU SET THE VOLUME TO ELEVEN?!?!?! 11 IS NOT DIVISIBLE BY ANY OF MY FAVOURITE NUMBERS!!!”
Sara despises it when the volume is set to a number not
divisible by at least one of her favourite numbers. For example
if her favourite numbers were
It depends on the radio model what range of volumes are offered, but all volume settings are always integers. Given the interval that the radio supports and Sara’s favourite numbers, can you say how many volume settings are possible that she’d be alright with?
Input
Integers
Output
A single integer
Scoring
Group |
Points |
Constraints |
1 |
20 |
|
2 |
20 |
|
3 |
15 |
|
4 |
15 |
|
5 |
30 |
No further constraints. |
Sample Input 1 | Sample Output 1 |
---|---|
1 30 2 2 5 |
18 |
Sample Input 2 | Sample Output 2 |
---|---|
17 100 1 7 |
12 |