Problem:


Score: 300 points

Problem Statement

In 2028 and after a continuous growth, AtCoder Inc. finally built an empire with six cities (City 1, 2, 3, 4, 5, 6)!

There are five means of transport in this empire:

Train: travels from City 1 to 2 in one minute. A train can occupy at most A people.

Bus: travels from City 2 to 3 in one minute. A bus can occupy at most B people.

Taxi: travels from City 3 to 4 in one minute. A taxi can occupy at most C people.

Airplane: travels from City 4 to 5 in one minute. An airplane can occupy at most D people.

Ship: travels from City 5 to 6 in one minute. A ship can occupy at most E people.

For each of them, one vehicle leaves the city at each integer time (time 0, 1, 2, ...).

There is a group of N people at City 1, and they all want to go to City 6.

At least how long does it take for all of them to reach there? 
You can ignore the time needed to transfer.  

Constraints

1 \leq N, A, B, C, D, E \leq 10^{15}

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N
A
B
C
D
E

Output

Print the minimum time required for all of the people to reach City 6, in minutes.

Sample Input 1

5
3
2
4
3
5

Sample Output 1

7

One possible way to travel is as follows.
First, there are N = 5 people at City 1, as shown in the following image:

In the first minute, three people travels from City 1 to City 2 by train. Note that a train can only occupy at most three people.

In the second minute, the remaining two people travels from City 1 to City 2 by train, and two of the three people who were already at City 2 travels to City 3 by bus. Note that a bus can only occupy at most two people.

In the third minute, two people travels from City 2 to City 3 by train, and another two people travels from City 3 to City 4 by taxi.

From then on, if they continue traveling without stopping until they reach City 6, all of them can reach there in seven minutes.

There is no way for them to reach City 6 in 6 minutes or less.

Sample Input 2

10
123
123
123
123
123

Sample Output 2

5

All kinds of vehicles can occupy N = 10 people at a time.
Thus, if they continue traveling without stopping until they reach City 6, all of them can reach there in five minutes.  

Sample Input 3

10000000007
2
3
5
7
11

Sample Output 3

5000000008

Note that the input or output may not fit into a 32-bit integer type.



Sample input:
5
3
2
4
3
5


Sample output:
7

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
for i in range(5):
    l.append(int(input()))

minimum = min(l)

ans = n // minimum + 5

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
lll = [int(input()) for _ in range(5)]
print(n // min(lll) + 1 + 4)

Submission status: Wrong Answer

Solution code:
N=int(input())
s=[]
for i in range(5):
    s.append(int(input()))
print(N//min(s)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
caps = []

for i in range(5):
    caps.append(int(input()))

minV = min(caps)

print(int(n // minV + 1+ 4))

Submission status: Wrong Answer

Solution code:
n = int(input())
caps = []

for i in range(5):
    caps.append(int(input()))

minV = min(caps)

print(n // minV + 1+ 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
ABCDE = [int(input()) for _ in range(5)]
m = min(ABCDE)
print(5 + N // m)

Submission status: Wrong Answer

Solution code:
N = int(input())
ABCDE = [int(input()) for _ in range(5)]
m = min(ABCDE)
print(4 + (N + m) // m)

Submission status: Wrong Answer

Solution code:
# 2019/08/07

n=int(input())
a=[int(input()) for _ in range(5)]
print(5+n//min(a))

Submission status: Wrong Answer

Solution code:
n, a, b, c, d, e = map(int, open(0))
bring = [a,b,c,d,e]
last = n
time = 0
for i in range(5):
    time += last // bring[i] + 1
    last = last % bring[i]
print(time)

Submission status: Wrong Answer

Solution code:
n = int(input())
trans = [int(input()) for _ in range(5)]

min_trans = min(trans)
print(n // min_trans + 1 + 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
capacity = []
for i in range(5):
    capacity.append(int(input()))

total = 0
for i in range(5):
    if i == 0:
        t = (N - 1) // capacity[i] + 1
        total += t
        move = capacity[i]
    else:
        n = max(move, (move - capacity[i]) * t)
        t = (n - 1) // capacity[i] + 1
        total += t
        move = min(move, capacity[i])

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())
capacity = []
for i in range(5):
    capacity.append(int(input()))

total = 0
for i in range(5):
    if i == 0:
        t = N // capacity[i] + 1
        total += t
        move = capacity[i]
    else:
        n = max(move, (move - capacity[i]) * t)
        t = (n - 1) // capacity[i] + 1
        total += t
        move = min(move, capacity[i])

print(total)

Submission status: Wrong Answer

Solution code:
from math import ceil
n,a,b,c,d,e = [int(input()) for _ in range(6)]
k = min(a,b,c,d,e)
print(n//k+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

m = min(a,b,c,d,e)

ans = 5 + n // m

print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

f = min(a, b, c, d, e)
print(n // f + 5)

Submission status: Wrong Answer

Solution code:
n=int(input())
li=[int(input()) for _ in range(5)]
print(n//min(li)+5)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

def main():
	n = int(input().strip())
	s = [0] * 5
	for i in range(5):
		s[i] = int(input().strip())
	m = min(s)
	print(n // m + 5)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
N = int(input())
transportations = []

for _ in range(5):
    transportation = int(input())
    transportations.append(transportation)

transportations.sort()
print(int(N / transportations[0]) + 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
transportations = []

for _ in range(5):
    transportation = int(input())
    transportations.append(transportation)

transportations.sort()
print(N // transportations[0] + 5)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

list1 = [A,B,C,D,E]
min1 = min(list1)
ans = N//min1 + 5

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
C = []
for _ in range(5):
    C.append(int(input()))

min_c = min(C)
print((N // min_c) + 5)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
k = []
for i in range(5):
    k.append(int(input()))
print(math.ceil(n / min(k)))

Submission status: Wrong Answer

Solution code:
N = int(input())
nums = [int(input()) for _ in range(5)]
print((N+1) // min(nums) + 4) if min(nums) < N else print(5)

Submission status: Wrong Answer

Solution code:
N = int(input())
nums = [int(input()) for _ in range(5)]
print(N // min(nums) + 5) if min(nums) < N else print(5)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
print(N // min(A, B, C, D, E) + 1 + 4)

Submission status: Wrong Answer

Solution code:
a = int(input())
b = 10 ** 9
for i in range(5):
    b = min(b, int(input()))
print((a + b - 1) // b + 4)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
tr = [int(i) for i in input().split()]

print(math.ceil(N/min(tr)))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
mmin = min(a, b, c, d, e)
print(5 + n // mmin)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
if n == min(a):
  print(4 + n//min(a))
else:
  print(5 + n//min(a))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print(5 + n//min(a))

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
abcde = [int(input()) for _ in range(5)]

mi = min(abcde)

if mi>=n:
    print(5)
else:
    print(math.ceil(n//mi)+5)

Submission status: Wrong Answer

Solution code:
n =int(input())
a = [int(input()) for _ in range(5)]
if min(a)<n: # 詰まる場合
  print(int(n/min(a)+0.5)+len(a)-1)
else:
  print(len(a))

Submission status: Wrong Answer

Solution code:
n =int(input())
a = [int(input()) for _ in range(5)]
if min(a)<n:
  print(int(n/min(a)+0.5)+len(a)-1)
else:
  print(int(n/min(a)+0.5)+len(a))

Submission status: Wrong Answer

Solution code:
n =int(input())
a = [int(input()) for _ in range(5)]
print(int(n//min(a))+len(a))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
m = min(a,b,c,d,e)
print(5 + n//m + (n%m > 0))

Submission status: Wrong Answer

Solution code:
N = int(input())
cost = [int(input()) for _ in range(5)]
n = N // min(cost) + 1
print(n + 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
lst = []
for i in range(0, 5):
	lst.append(int(input()))
lst.sort()
print(5+N//lst[0])

Submission status: Wrong Answer

Solution code:
N = int(input())
cities = [int(input()) for i in range(5)]

min_city = min(cities)
if N < min_city:
  print(5)
else:
  times = N//min_city
  print(5+times)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
l = [a, b, c, d, e]
l_m = min(l)

if (n/l_m)%1 == 0:
    print(4+n/l_m)
else:
    print(5+int(n/l_m))

Submission status: Wrong Answer

Solution code:
n=int(input())
num=[]
for _ in range(5):
  x=int(input())
  num.append(x)
print(5+n//min(num))

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
d = int(raw_input())
e = int(raw_input())

bottle_neck = min([a, b, c, d, e]) 
extra = n / bottle_neck if n != bottle_neck else 0
print 5 + extra

Submission status: Wrong Answer

Solution code:
n = int(raw_input())
a = int(raw_input())
b = int(raw_input())
c = int(raw_input())
d = int(raw_input())
e = int(raw_input())

bottle_neck = min([a, b, c, d, e])
extra = n / bottle_neck
print 5 + extra

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

def ceil(a,b) :
    fl = a // b
    return fl + ((a % b == 0) if 0 else 1)

time =[A , B , C , D , E]
time.sort()

minTime = time[0]

ans = ceil(N,minTime) + 4

print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input())for _ in range(6)]
print(max(a[0] + (a[1] - 1) // a[1], a[0] + (a[2] - 1) // a[2], a[0] + (a[3] - 1) // a[3], a[0] + (a[4] - 1) // a[4]
          , a[0] + (a[5] - 1) // a[5]) + 4)

Submission status: Wrong Answer

Solution code:
a = [int(input())for _ in range(6)]
if a[0] <= a[1] <= a[2] <= a[3] <= a[4] <= a[5]:
    print(5)
else:
    print(max(a[0] // a[1], a[0] // a[2], a[0] // a[3], a[0] // a[4], a[0] // a[5]) + 5)

Submission status: Wrong Answer

Solution code:
a = [int(input())for _ in range(6)]
if a[0] == a[1] == a[2] == a[3] == a[4] == a[5]:
    print(5)
else:
    print(max(a[0] // a[1], a[0] // a[2], a[0] // a[3], a[0] // a[4], a[0] // a[5]) + 5)

Submission status: Wrong Answer

Solution code:
a = [int(input())for _ in range(6)]
print(max(a[0] // a[1], a[0] // a[2], a[0] // a[3], a[0] // a[4], a[0] // a[5]) + 5)

Submission status: Wrong Answer

Solution code:
def main():

    capa = []
    n = int(raw_input())
    ans = 0

    for i in range(5):
        capa.append(int(raw_input()))
    sorted_capa = sorted(capa)
    if n % sorted_capa[0] == 0:
        ans = 4 + n//sorted_capa[0]
    else:
        ans = 4 + n//sorted_capa[0] + 1
        print(ans)
    """
    people = [n]
    for i in range(5):
        people.append(0)
    print(capa,people)
    while people[-1] < n:
        for i in reversed(range(0,6)):
            if i != 0:
                people[i] += min(people[i-1],capa[i-1])
                people[i-1] -= min(people[i-1],capa[i-1])
        time += 1
        print(people,time)
    print(time)

    """
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
def main():

    capa = []
    n = int(raw_input())
    ans = 0

    for i in range(5):
        capa.append(int(raw_input()))
    sorted_capa = sorted(capa)
    print(sorted_capa)
    if n % sorted_capa[0] == 0:
        ans = 4 + n//sorted_capa[0]
    else:
        ans = 4 + n//sorted_capa[0] + 1
        print(ans)
    """
    people = [n]
    for i in range(5):
        people.append(0)
    print(capa,people)
    while people[-1] < n:
        for i in reversed(range(0,6)):
            if i != 0:
                people[i] += min(people[i-1],capa[i-1])
                people[i-1] -= min(people[i-1],capa[i-1])
        time += 1
        print(people,time)
    print(time)

    """
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
n, a, b, c, d, e = [int(input()) for i in range(6)]

print(n // min(a, b, c, d, e) + 5)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
_min = min(A,B,C,D,E)
d = N // _min
if N / _min != 0:
    d += 1
print(d + 4)

Submission status: Wrong Answer

Solution code:
import math
N,A,B,C,D,E = int(input()),int(input()),int(input()),int(input()),int(input()),int(input())
math.ceil(N/min(A,B,C,D,E)+4)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
ls = [A,B,C,D,E]
X = min((A,B,C,D,E))
for i in range(len(ls))[::-1]:
  if ls[i]==X:
    break

s=N//X
print(s+5)

Submission status: Wrong Answer

Solution code:
a = [float(input()) for i in range(6)]

limit = []
for i in range(5):
    limit.append(a[i + 1])

neck = min(limit)

ans = a[0] // neck + 5
print(int(ans))

Submission status: Wrong Answer

Solution code:
a = [float(input()) for i in range(6)]

limit = []
for i in range(5):
    limit.append(a[i + 1])

neck = min(limit)

ans = a[0] // neck + 5
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]

limit = []
for i in range(5):
    limit.append(a[i + 1])

neck = min(limit)

ans = a[0] // neck + 5
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
min = 1000000000
for i in range(5):
  k = int(input())
  if min>k:
    min = k
if n%min==0:
  ans = 5+int(n/min)-1
else:
  ans = 5+int(n/min)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
num_list = []
for i in range(5):
  num_list.append(int(input()))

print(N // min(num_list) + 5)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
carry = [0]*7
state = [N, 0, 0, 0, 0, 0]
ans = 0
for i in range(1,6):
    carry[i] = int(input())
for i in range(0,5):
    cost = math.ceil(state[i] / carry[i+1])
    latency = cost - 1
    ans += cost
    state[i+1] = N - carry[i+2] * latency
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    N = INT()
    minv = 10^5
    for i in range(5):
        minv = min(minv, INT())
    print(5 + math.ceil(N/minv) - 1)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
print(N//min(a)+5)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())

mini=min(A,B,C,D,E)
print(N//mini+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
trans = [int(input()) for i in range(5)]

print(5+N//min(trans))

Submission status: Wrong Answer

Solution code:
import math, copy

N = int(input())

A = [0] * 5
A[0] = int(input())
A[1] = int(input())
A[2] = int(input())
A[3] = int(input())
A[4] = int(input())

# 最後に到着する人がかかる時間を求めればよい
# 乗り物に乗れる人数 < 最終グループの人数 が成り立つときに、遅延が発生
P = [0] * 6
Q = [0] * 6
P[0] = N
Q[0] = N
counter = 0

while P[5] != N:
	# print(P)
	# print("/////////")
	counter += 1
	# それぞれのマスiについて
	for i in range(5):
		if A[i] >= P[i]: # 移動できる人の数 >= 移動したい人の数
			Q[i + 1] += P[i] # iマス目にいた人をi + 1マス目に移す
			Q[i] -= P[i]
		else: # 遅延が発生
			move_num = (P[i] - P[i] % A[i]) #　このとき、次のマスに行けるのは、5 - 5 % 3 = 3人だけ
			Q[i] -= move_num
			Q[i + 1] += move_num
	P = copy.deepcopy(Q) # 状態を更新する
		
print(counter)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

move_p = [a, b, c, d, e]
# pos = np.zeros(6)
# pos_pre = np.zeros(6)
# move_n = np.zeros(5)
# pos[0] = n
# cnt = 0
# while sum(pos[: 6]) != 0:

#     for i in range(5):
#         if move_p[i] <= pos[i]:
#             move_n[i] = move_p[i]
#             pos[i] -= move_n[i]
#             pos_pre[i + 1] += move_n[i]
#         elif pos[i] < move_p[i]:
#             move_n[i] = pos[i]
#             pos[i] -= move_n[i]
#             pos_pre[i + 1] += move_n[i]

#     for i in range(5):
#         pos[i] += pos_pre[i]
#         pos_pre[i] = 0
#     cnt += 1

min_ = min(move_p)
cnt = n // min_ + 1 + 4

print(cnt)

Submission status: Wrong Answer

Solution code:
import numpy as np

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

move_p = [a, b, c, d, e]
# pos = np.zeros(6)
# pos_pre = np.zeros(6)
# move_n = np.zeros(5)
# pos[0] = n
# cnt = 0
# while sum(pos[: 6]) != 0:

#     for i in range(5):
#         if move_p[i] <= pos[i]:
#             move_n[i] = move_p[i]
#             pos[i] -= move_n[i]
#             pos_pre[i + 1] += move_n[i]
#         elif pos[i] < move_p[i]:
#             move_n[i] = pos[i]
#             pos[i] -= move_n[i]
#             pos_pre[i + 1] += move_n[i]

#     for i in range(5):
#         pos[i] += pos_pre[i]
#         pos_pre[i] = 0
#     cnt += 1

min_ = min(move_p)
cnt = int(n / min_) + 1 + 4

print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ans=5

mins = min(a,b,c,d,e)
if mins==n:
    print(ans)
else:
    print(ans+n//mins)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
ans=5

print(ans+n//min(a,b,c,d,e))

Submission status: Wrong Answer

Solution code:
N=int(input())
L=[int(input()) for i in range(5)]
print(N//min(L)+5)

Submission status: Wrong Answer

Solution code:
N=int(input())
L=[int(input()) for i in range(4)]
print(N//min(L)+5)

Submission status: Wrong Answer

Solution code:
N,A,B,C,D,E = [int(input()) for _ in range(6)]
x = min(A,B,C,D,E)
answer = (N+x-1)//x
print(answer)

Submission status: Wrong Answer

Solution code:
n = int(input())
li = [int(input()) for _ in range(5)]

k = li.index(min(li))
print(n//li[k] + 5)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
n = a.pop(0)
b = min(a)
if n > b:
    print(n//b+5)
else:
    print('5')

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
n = a.pop(0)
b = min(a)
print(n//b+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
lis = []
for _ in range(5):
    lis.append(int(input()))

print(4 + (N // (min(lis))) + 1)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

bn = min(a, b, c, d, e)

print(4 + 1 + n // bn)

Submission status: Wrong Answer

Solution code:
N = int(input())
capacity = [int(input()) for i in range(5)]
min = min(capacity)
count = N // min

if N // min == 0:
    print(5+count-1)
else:
    print(5+count)

Submission status: Wrong Answer

Solution code:
N = int(input())
capacity = [int(input()) for i in range(5)]
min = min(capacity)
count = N // min
print(5+count)

Submission status: Wrong Answer

Solution code:
N, *C = [int(input()) for _ in range(6)]

print(4 + N // min(C) + 1 if (N % min(C)) else 0)

Submission status: Wrong Answer

Solution code:
n=int(input())
time=[]
  
for i in range(5):
  time.append(int(input()))
  
times,modul=n//min(time),n%min(time)

if times == 1 and modul == 0:
  print(5)
else:
  print(times+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
time=[]
  
for i in range(5):
  time.append(int(input()))
  
times,modul=n//min(time),n%min(time)

print(times+5)

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
L=[int(input()) for i in range(5)]
m=math.ceil(N//min(L))
print(m+5)

Submission status: Wrong Answer

Solution code:
import math
L=[int(input()) for i in range(6)]
Step=0
min=L[0]
for i in range(5):
  if min > L[i+1]:
    Step=Step+math.ceil(min/L[i+1])
    min=L[i+1]
  else:
    Step=Step+1
print(Step)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

minimum = min(A, B, C, D, E)

print((N // minimum) + 1 + 4)

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e = input_tmp[1:]

min_value = min(a2e)

if n <= min_value:
    print(5)
else:
    print(n // min_value + 5)

Submission status: Wrong Answer

Solution code:
import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e = input_tmp[1:]

min_value = min(a2e)

if n >= min_value:
    print(5)
else:
    print(n // min_value + 5)

Submission status: Wrong Answer

Solution code:
n1 = int(input())
na1 = []

for i1 in range(5):
    na1.append(int(input()))

n2 = min(na1)

r1 = n1 // n2

r1 += 5
print(r1)

Submission status: Wrong Answer

Solution code:
n=int(input())
tr=[]
for i in range(5):
  tr.append(int(input()))
print(5+(n//min(tr)))

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(n//min(a,b,c,d,e)+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
print(n/min(a,b,c,d,e)+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
abcde = [int(input()) for _ in range(5)]

m = min(abcde)
print(5 + N//m)

Submission status: Wrong Answer

Solution code:
import sys
import math

input = sys.stdin.readline

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
print(4+max(math.ceil((n+1)/a), math.ceil((n+1)/b), math.ceil((n+1)/c), math.ceil((n+1)/d), math.ceil((n+1)/e)))

Submission status: Wrong Answer

Solution code:

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
print(max(n//a,n//b,n//c,n//d,n//e)+5)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[int(input()) for i in range(5)]
min_l=min(l)
t=int(n/min_l)+5
print(t)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[int(input()) for i in range(5)]

t=5
for i in range(5):
  if l[i]<n:
    x=0
    if i==0:
      if n%l[i]==0:
        x=int(n/l[i])-1
      else:
        x=int(n/l[i])
    else:
      if l[i]<min(l[0:i]):
        if min(l[0:i])%l[i]==0:
          x=int(min(l[0:i])/l[i])-1
        else:
          x=int(min(l[0:i])/l[i])
    t+=x
print(t)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
city = [int(input()) for _ in range(5)]
print(math.ceil(n // min(city) + 5))

Submission status: Wrong Answer

Solution code:
import math
def resolve():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    speed = min([A, B, C, D, E])
    waittime = N // speed
    return waittime + 5

    

if '__main__' == __name__:
    print(resolve())

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[1]:


N = int(input())
A = [int(input()) for i in range(5)]
"""
5
3
2
4
3
5
"""


# In[16]:


print(N//min(A)+5)


# In[11]:


#ppl = [0]*6
#ppl[0] += N


# In[13]:


"""
time = 0
while max(ppl[:5]) > 0:
    tmppl = ppl.copy()
    for i in range(len(A)):
        mina = A[i] if ppl[i]>=A[i] else ppl[i]
        tmppl[i] -= mina
        tmppl[i+1] += mina
    ppl = tmppl
    time += 1
    #print(ppl)
"""


# In[14]:


#print(time)


# In[ ]:

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
bottleneck = min([A,B,C,D,E])
print(N//bottleneck + 5)

Submission status: Wrong Answer

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7

def LI(): return list(map(int,input().split()))
def I(): return int(input())
def LS(): return input().split()
def S(): return input()

def main():
  n=I()
  l=[I() for _ in range(5)]

  for i in range(len(l)):
    if l[i]==min(l):
      return -(-n//l[i])+len(l)-i-1

print(main())

Submission status: Wrong Answer

Solution code:

def main():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())

    min_ = min([A, B, C, D, E])
    print(5+N//min_)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
inputstr1 = [int(input()) for _ in range(6)]

s =[]
for i in range(1, 6):
    s.append(inputstr1[i])
ss = sorted(s)

if inputstr1[0] > ss[0]:
    maxtime = inputstr1[0] // ss[0]
else:
    maxtime = 0

print(maxtime + 5)

Submission status: Wrong Answer

Solution code:
inputstr1 = [int(input()) for _ in range(6)]

s =[]
for i in range(1, 6):
    s.append(inputstr1[i])
ss = sorted(s)
print(ss)
if inputstr1[0] > ss[0]:
    maxtime = inputstr1[0] // ss[0]
else:
    maxtime = 0

print(maxtime + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
pTrans = []
for _ in range(5):
        a = int(input())
        pTrans.append(a)
if n < min(pTrans) :
        print('5')
elif n//min(pTrans) == 0 :
        print(n//min(pTrans) + 4)
else :
        print(n//min(pTrans) + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
pTrans = []
for _ in range(5):
        a = int(input())
        pTrans.append(a)
if n < min(pTrans) :
        print('5')
else :
        print(n//min(pTrans) + 5)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

points = [A,B,C,D,E]
print(N // min(points) + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for _ in range(5)]
print((n-1)//min(a)+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for _ in range(5)]
print(n//min(a)+4)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print((n-1)//max(a)+5)

Submission status: Wrong Answer

Solution code:
inputstr1 = [int(input()) for _ in range(6)]

s =[]
for i in range(1, 6):
    s.append(inputstr1[i])
ss = sorted(s)

maxtime = inputstr1[0] // ss[0]

print(maxtime + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print((n//min(a))+4)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print(n//min(a)+4)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print(n//min(a)+6 if min(a)==1 else n//min(a)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
print(n//min(a)+5)

Submission status: Wrong Answer

Solution code:
import math
num = []
n = int(input())
for i in range(5):
    num.append(int(input()))
t = math.ceil(n / min(num) + 4)

Submission status: Wrong Answer

Solution code:
n, *wait = [int(input()) for i in range(6)]
clash = n
wait_min = wait[0]
if n / wait[0] == 1:
    minutes = 0
else:
    minutes = n // wait[0]
for i in range(4):
    if wait[i] > wait[i + 1]:
        if wait_min != min(wait_min, wait[i + 1]):
            minutes += wait[i] // wait[i + 1]
            wait_min = wait[i + 1]
print(minutes + 5)

Submission status: Wrong Answer

Solution code:
N = int(input())
tr = [int(input()) for i in range(5)]
s = -(-N // tr[0])
cnt = 5 + s - 1
for i in range(1, 5):
    # print(cnt, s, (-(-N // tr[i]) - s))
    if (-(-N // tr[i]) - (-(-N // tr[i-1]))) > 0:
        cnt += -(-N // tr[i]) - (-(-N // tr[i-1]))
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
tr = [int(input()) for i in range(5)]
s = -(-N // tr[0])
cnt = 5 + s - 1
for i in range(1, 5):
    # print(cnt, s, (-(-N // tr[i]) - s))
    if (i == 1) and ((-(-N // tr[i]) - s) > 0):
        cnt += (-(-N // tr[i]) - s)
    elif (i != 1) and ((-(-N // tr[i]) - -(-N // tr[i-1])) > 0):
        cnt += (-(-N // tr[i]) - -(-N // tr[i-1]))
print(cnt)

Submission status: Wrong Answer

Solution code:
n, *wait = [int(input()) for i in range(6)]
clash = n
wait_min = wait[0]
if n / wait[0] == 1:
    minutes = 0
else:
    minutes = n // wait[0]
for i in range(1, 4):
    if wait[i] > wait[i + 1]:
        if wait_min != min(wait_min, wait[i + 1]):
            minutes += wait[i] // wait[i + 1]
            wait_min = wait[i + 1]

print(minutes + 5)

Submission status: Wrong Answer

Solution code:
n, *wait = [int(input()) for i in range(6)]
clash = n
wait_min = wait[0]
if n / wait[0] == 1:
    minutes = 0
else:
    minutes = n // wait[0]

for i in range(4):
    if wait[i] > wait[i + 1]:
        if wait_min != min(wait_min, wait[i + 1]):
            print(wait[i])
            minutes += wait[i] // wait[i + 1]
            wait_min = wait[i + 1]

print(minutes + 5)

Submission status: Wrong Answer

Solution code:
n, *wait = [int(input()) for i in range(6)]
clash = n
wait_min = wait[0]
minutes = n // wait[0]

for i in range(4):
    if wait[i] > wait[i + 1]:
        if wait_min != min(wait_min, wait[i + 1]):
            minutes += wait[i] // wait[i + 1]
            wait_min = wait[i + 1]

print(minutes + 5)

Submission status: Wrong Answer

Solution code:
N = int(input())
tr = [int(input()) for i in range(5)]
s = -(-N // tr[0]) 
cnt = 5 + s - 1
for i in range(1, 5):
    # print(cnt, s,(-(-N // tr[i]) - (s + 1)))
    if (-(-N // tr[i]) - (s + 1)) >= 0:
        cnt += (-(-N // tr[i]) - (s + 1))
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
tr = [int(input()) for i in range(5)]
s = -(-N // tr[0]) - 1
cnt = 5 + s
for i in range(1, 5):
    # print(cnt, s,(-(-N // tr[i]) - (s + 1)))
    if (-(-N // tr[i]) - (s + i)) >= 0:
        cnt += (-(-N // tr[i]) - (s + i))
print(cnt)

Submission status: Wrong Answer

Solution code:
n, *wait = [int(input()) for i in range(6)]
minutes = 0
clash = n

for i in range(5):
    if clash > 0:
        minutes += clash // wait[i]
    clash = n % wait[i]

print(minutes + 5)