Problem 2

0

0 votes
Medium
Problem

Elementry maths, my dear watson!

example 1
input
2 2 3 1 4
output
0

example 2
input
6 3 4 10 15
output
3

example 3
input
18 3 1 6 10
output
2

Time Limit: 5
Memory Limit: 256
Source Limit:
Editor Image

?