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:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n = I()
    trans = [I(), I(), I(), I(), I()]
    ans = n//min(trans) + 5
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
info=[]
for _ in range(6):
  info.append(int(input()))
ans=5+info[0]//min(info[1:])
print(ans)

Submission status: Wrong Answer

Solution code:
info=[]
for _ in range(6):
  info.append(int(input()))
ans=4+info[0]//min(info[1:])
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

#print(lst)
#print(min(lst),N//min(lst))
'''
if min(lst) >= N:
    print(5)
else:
    print(N//min(lst)+5)
'''
print(math.floor(N/min(lst))+5)

Submission status: Wrong Answer

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

#print(lst)
#print(min(lst),N//min(lst))
if min(lst) >= N:
    print(5)
else:
    print(N//min(lst)+5)

Submission status: Wrong Answer

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

#print(lst)
#print(min(lst),N//min(lst))
if min(lst) > N:
    print(5)
else:
    print(N//min(lst)+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
minn = 10**16
for i in range(5):
    minn = min(minn, int(input()))
print(n // minn + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
minn = 10**12
for i in range(5):
    minn = min(minn, int(input()))
print(n // minn + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
minn = 10**6
for i in range(5):
    minn = min(minn, int(input()))
print(n // minn + 5)

Submission status: Wrong Answer

Solution code:
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
X=[A%10,B%10,C%10,D%10,E%10]
minimum=100
for i in range(5):
  if X[i]!=0:
    minimum=min(minimum,X[i])
Y=[A,B,C,D,E]
if minimum==100:
  minimum=0
last=X.index(minimum)
time=0
import math
for i in range(5):
  if i!=last:
    time =time+10*math.ceil(Y[i]/10)
if X==[0,0,0,0,0]:
  print(sum(Y))
else:
  print(time+Y[last])

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
n, a, b, c, d, e = map(int, open(0).read().split())
s = min(a, b, c, d, e)
print(5 + n//s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def main2():
    n=int(input())
    l = []
    for i in range(5):
        s = int(input())
        l.append(s)
    print(math.ceil((n)//min(l))+4)
if __name__ == '__main__':
    main2()

Submission status: Wrong Answer

Solution code:

def main2():
    n=int(input())
    l = []
    for i in range(5):
        s = int(input())
        l.append(s)
    print((n)//min(l)+5)
if __name__ == '__main__':
    main2()

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())

print(math.ceil(n//min(a,b,c,d,e))+4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
# https://atcoder.jp/contests/abc123/tasks/abc123_c

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])
ans = 5 + n // MIN
print(ans)

Submission status: Wrong Answer

Solution code:
n= int(input())
b=10**15+1
for i in range(5):
    b=min(b,int(input()))

print(5+n//b)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=10**15+1
a=[int(input()) for _ in range(5)]
print((n-1)//max(a)+5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(sys.stdin.readline())
A = int(sys.stdin.readline())
B = int(sys.stdin.readline())
C = int(sys.stdin.readline())
D = int(sys.stdin.readline())
E = int(sys.stdin.readline())

min_v = min(A, B, C, D, E)
print(N // min_v + 1 + 4)

Submission status: Wrong Answer

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

M = 5
W = (N//min(C))

print(M+W)

Submission status: Wrong Answer

Solution code:
import collections
n = int(raw_input())
ais = map(int,[raw_input() for _ in range(5)])

t =  0
def f(i, n , ais):
	if i == len(ais):
		return 0
	# how long to move n people from i to i + 1?
	q = (n + ais[i] - 1) / ais[i]
	r = 0
	return q + f(i + 1, ais[i],ais)
	
print f(0, n , ais)

Submission status: Wrong Answer

Solution code:
#解説確認後

N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)

print((N//min_num)+4) #この式のみでok

Submission status: Wrong Answer

Solution code:
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)
if N < min_num:
    print(5)
elif min_num == 1:
    print((N//min_num)+(5-Carry.index(min_num)))
elif N % min_num == 0:
    print((N//min_num))
else:
    print((N//min_num)+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)
if N < min_num:
    print(5)
elif N % min_num == 0:
    print((N//min_num))
elif min_num == 1:
    print((N//min_num)+(5-Carry.index(min_num)))
else:
    print((N//min_num)+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)
if N < min_num:
    print(5)
elif N % min_num == 0:
    print((N//min_num))
else:
    print((N//min_num)+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
Carry = []
for i in range(5):
    Carry.append(int(input()))
min_num = min(Carry)
if N % min_num == 0:
    print((N//min_num))
else:
    print((N//min_num)+5)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
buses = [int(input())for i in range(5)]
buses.sort()
capa = (n//buses[0])
print(5+capa)

Submission status: Wrong Answer

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

neck, midx = -1, 0
for i in range(5):
    if neck == -1:
        neck = cap[i]
        midx = i
    elif neck > cap[i]:
        neck = cap[i]
        midx = i
if neck >= n:
    ans = 5
else:
    ans = 4 + n // neck + n % neck
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())
ans=5
x=[a,b,c,d,e]
s=0
if n>a:
    s=math.ceil(n/a)
for i in range(4):
    if x[i]>x[i+1]:
        t=x[i]//x[i+1]
        if x[i]%x[i+1]!=0:
            t+=1
        s=max(s,t)
print(ans+s)

Submission status: Wrong Answer

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

print(math.ceil(N//min(S))+4)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = [int(input()) for _ in range(5)]
print(ls)
k = n/min(ls)
if k % 1 != 0:
    k = int(k) + 1
else:
    k = int(k)
print(k+4)

Submission status: Wrong Answer

Solution code:
n = int(input())
ls = [int(input()) for _ in range(5)]
k = n/min(ls)
if k % 1 != 0:
    k = int(k) + 1
print(k+4)

Submission status: Wrong Answer

Solution code:
n = int(input())
p = []
for _ in range(5):
    p.append(int(input()))
m = min(p)
idx = p.index(m)
ans = (idx - 1) + n // 2 + (5 - idx)
if n % m:
    ans += 1
print(ans)

Submission status: Wrong Answer

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

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

X = min([A, B, C, D, E])
ans = N // X + 1 + 4
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a=list(int(input()) for _ in range(6))
ans=0
for i in range(1,6):
    if a[i-1]<=a[i]:
        ans+=1
    else:
        ans+=math.ceil(a[i-1]/a[i])
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a=list(int(input()) for _ in range(6))
ans=0
for i in range(1,6):
    if a[i-1]<=a[i]:
        ans+=1
    else:
        ans+=math.ceil(a[i-1]/a[i])
    print(ans)
print(ans)

Submission status: Wrong Answer

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

now = n
point = 0
point += now//a
now = min(now,a)
point += now//b
now = min(now,b)
point += now//c
now = min(now,c)
point += now//d
now = min(now,d)
point += now//e
now = min(now,e)
point += 5

print(point)

Submission status: Wrong Answer

Solution code:
import math
def main():
    N = int(input())
    A = int(input())
    B = int(input())
    C = int(input())
    D = int(input())
    E = int(input())
    cost = [A, B, C, D, E]

    f = lambda x : int((N//x))
    t = [f(A), f(B), f(C), f(D), f(E)]

    idx = 0
    ma = 0

    for i in range(len(t)):
        if t[i] > ma:
            ma = t[i]
            idx = i
    ma += idx
    print(ma + (5 - idx))

if __name__ == "__main__":
    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())

    ans = max(N//A, N//B, N//C, N//D, N//E) + 5
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = list(int(input()) for _ in range(5))
if min(a) < n:
  if n/min(a)-int(n/min(a)) >= 0.5:print(n//min(a)+1+4)
  else: print(n//min(a)+4)
else:print(5)

Submission status: Wrong Answer

Solution code:
from math import ceil

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

if min(A,B,C,D,E) >= N:
    print(5)
else:
    print(5+ceil(N//min(A,B,C,D,E)))

Submission status: Wrong Answer

Solution code:
from math import ceil

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

print(5+ceil(N//min(A,B,C,D,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())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
trans = [int(input()) for i in range(5)]
print(N // min(trans) + 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())


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

ans = 5 if mi > N else 4+N//mi+N%mi
print(ans)

Submission status: Wrong Answer

Solution code:

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())


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

ans = 5 if mi > N else 4+N//mi+N%2
print(ans)

Submission status: Wrong Answer

Solution code:

N = int(input())

P = []
for i in range(5):
    p = int(input())
    P.append([p, i])

P.sort()
#print(P)

s = 1 if P[0][0] > N else N//P[0][0]+N%2

ans = P[0][1] + s + 5-1-P[0][1]
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
t=[int(input()) for i in range(5)]
ans=0
ans+=math.ceil(n/t[0])
time=math.ceil(n/t[0])
for i in range(4):
  if t[i+1]>=t[i]:
    ans+=1
  else:
    ans+=abs(math.ceil(n/t[i+1])-math.ceil(n/t[i]))+1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
t=[int(input()) for i in range(5)]
ans=0
ans+=math.ceil(n/t[0])
time=math.ceil(n/t[0])
for i in range(4):
  if t[i+1]<=t[i]:
    ans+=abs(math.ceil(n/t[i+1])-time)+1
    time=math.ceil(n/t[i+1])
  else:
    ans+=abs(math.ceil(n/t[i])-time)+1
    time=math.ceil(n/t[i+1])
print(ans)

Submission status: Wrong Answer

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

small=min(A,B,C,D,E)
if small>=N:
    print(5)
else:
    print(5+N//small)

Submission status: Wrong Answer

Solution code:
n = int(input())
abc = []
res = [0]*5
for i in range(5):
    a = int(input())
    abc.append(a)
    res[i] = -(-n//a)-1
ans = 5
for i in range(5):
    if i == 0:
        if res[i] != 0:
            ans += res[i]
    elif res[i-1] < res[i]:
        ans += res[i] - res[i-1]
print(ans)

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 = N//min(A,B,C,D,E) + 5

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
A=[]
B=[0,0,0,0,0]
aa=int((n-0.1)//a)+1
ba=int((n-0.1)//b)+1
ca=int((n-0.1)//c)+1
da=int((n-0.1)//d)+1
ea=int((n-0.1)//e)+1
A.extend([aa,ba,ca,da,ea])
print(A)
for i in range(4):
    for j in range(i+1,5):
        if A[i]<A[j]:
            A[j]=A[j]-A[i]
        else:
            A[j]=0
print(A)
ans = 5+A[0]+A[1]+A[2]+A[3]+A[4]-1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
for i in range(5):
    a = int(input())
    li.append(a)
li.sort()
print((n+li[0])//li[0] + 4)

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
for i in range(5):
    a = int(input())
    li.append(a)
li.sort()
if n//li[0] >= 1:
    print(n//li[0] + 5)
else:
    print(5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
li = []
for i in range(5):
    li.append(int(input()))
li.sort()
if n//li[0] == 0:
    print(5+max(n//li[0]-1,0))
else:
    print(5+n//li[0])

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3

n, a, b, c, d, e = [int(input()) for _ in range(6)]

ans = (n-1)//min(a, b, c, d)+1 + 4
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
#import numpy as np
import math
#from fractions import Fraction
#import itertools
from collections import deque
#import heapq
from fractions  import gcd

input=sys.stdin.readline
n=int(input())
x=[int(input()) for _ in range(5)]
t=[0]*5
t[0]=math.ceil(n/x[0])
for i in range(1,5):
    if x[i]>=x[i-1]:
        t[i]=t[i-1]+1
    else:
        t[i]=i+1+math.ceil(n/x[i])
print(t[-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())

import math
t1 = math.ceil(n/a)
tt = math.ceil(n/a)
t2 = t1+max(1,math.ceil(n/b-tt+1))
t3 = t2+max(1,math.ceil(n/c-tt+2))
t4 = t3+max(1,math.ceil(n/d-tt+3))
t5 = t4+max(1,math.ceil(n/e-tt+4))

print(t5)

Submission status: Wrong Answer

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

import math
t1 = math.ceil(n/a)
tt = math.ceil(n/a)
t2 = t1+max(1,math.ceil(n/b-tt+1))
t3 = t2+max(1,math.ceil(n/c-tt+1))
t4 = t3+max(1,math.ceil(n/d-tt+1))
t5 = t4+max(1,math.ceil(n/e-tt+1))

print(t5)

Submission status: Wrong Answer

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

import math
t1 = math.ceil(n/a)
tt = math.ceil(n/a)
t2 = t1+max(1,math.ceil(n/b-tt+1))
t3 = t2+max(1,math.ceil(n/c-tt+1))
t4 = t3+max(1,math.ceil(n/d-tt+1))
t5 = t1+max(1,math.ceil(n/e-tt+1))

print(t5)

Submission status: Wrong Answer

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

import math
t1 = math.ceil(n/a)
t2 = t1+max(1,math.ceil(n/b-t1+1))
t3 = t2+max(1,math.ceil(n/c-t1+2))
t4 = t3+max(1,math.ceil(n/d-t1+3))
t5 = t4+max(1,math.ceil(n/e-t1+4))

print(t5)

Submission status: Wrong Answer

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

import math
t1 = math.ceil(n/a)
t2 = t1+max(1,math.ceil(n/b-t1+1))
t3 = t2+max(1,math.ceil(n/c-t2+1))
t4 = t3+max(1,math.ceil(n/d-t3+1))
t5 = t4+max(1,math.ceil(n/e-t4+1))

print(t5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
import math
x = math.ceil(n / a)
y = math.ceil(n / b)
z = math.ceil(n / c)
v = math.ceil(n / d)
w = math.ceil(n / e)
print(x + max(1, y - x + 1) + max(1, z - y + 1) + max(1, v - z + 1) + max(1, w -v + 1))

Submission status: Wrong Answer

Solution code:
n =  int(input())
a = [int(input()) for i in range(5)]
#print(a)
hito = [n, 0, 0, 0, 0, 0]
#print(hito)
count = 0
while count != 5:
  for i in range(4, -1, -1):
    if hito[i] >= a[i]:
      hito[i+1] += a[i]
      hito[i] -= a[i]
    else:
      hito[i+1] += hito[i]
      hito[i] = 0
  #print(hito)
  count += 1

if hito[5] == n:
  print(count)

repeat = hito[0] // a[0]
#print(repeat)
hito[0] = hito[0] % a[0]
for i in range(1, 5):
  if a[i-1] > a[i]:
    hito[i] += (a[i-1]-a[i])*repeat

hito[5] = n - sum(hito[0:5])
#print(hito)

count += repeat

while hito[5] != n:
  for i in range(4, -1, -1):
    if hito[i] >= a[i]:
      hito[i+1] += a[i]
      hito[i] -= a[i]
    else:
      hito[i+1] += hito[i]
      hito[i] = 0
  #print(hito)
  count += 1
  
print(count)

Submission status: Wrong Answer

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
n = ii()
l = []
for i in range(5):
    l.append(ii())

print(n//min(l)+5)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
Min = 10000000000000000
for _ in range(5):
	Min = min(int(input()),Min)
ans = 5
if n/Min >1:
	ans +=n//Min
print(ans)

Submission status: Wrong Answer

Solution code:
from math import ceil
n = int(input())
ans = 0
b = n
neck = n
for i in range(5):
    a = int(input())
    if a < neck:
        ans += ceil(b/a)
        neck = a
    else:
        ans += 1
    b = a
print(ans)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
print((a[0] + 1) // min(a[1:]) + 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())
import math
print(int(5+math.ceil(N/min(A,B,C,D,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())
import math
print(5+math.ceil(N//min(A,B,C,D,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(5+(N//min(A,B,C,D,E)))

Submission status: Wrong Answer

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

ans = 5 + N // mx
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
l=[int(input()) for i in range(5)]
sum=0
w=n
for i in range(4):
  c=math.ceil((w/l[i]))
  sum+=c
  w=w-w%l[i]-(c-1)*l[i+1]+w%l[i]
  if w==0:
    w=l[i]
print(sum+math.ceil(w/l[4]))

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
l=[int(input()) for i in range(5)]
sum=0
w=n
for i in range(4):
  c=math.ceil((w/l[i]))
  sum+=c
  w=w-(c-1)*l[i+1]+w%l[i]
  if w==0:
    w=l[i]
print(sum+math.ceil(w/l[4]))

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
l=[int(input()) for i in range(5)]
sum=0
w=n
for i in range(5):
  sum+=math.ceil(w/l[i])
  if w%l[i]!=0:
    w=w%l[i]
  else:
    w=l[i]
print(sum)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
l=[int(input()) for i in range(5)]
sum=0
w=n
for i in range(5):
  sum+=math.ceil(w/l[i])
  w%=l[i]
print(sum)

Submission status: Wrong Answer

Solution code:
# input
N = int(input())

Cap = []
append = Cap.append
for i in range(5):
    append(int(input()))

# check
total = 0
citys = [N] + ([0] * 5)

print(0, citys)

while citys[5] != N:
    for i in range(5, 0, -1):

        if 0 < citys[i - 1] <= Cap[i - 1]:
            mov = citys[i - 1]
            citys[i] += mov
            citys[i - 1] = 0
        elif citys[i - 1] > Cap[i - 1]:
            mov = Cap[i - 1]
            citys[i] += mov
            citys[i - 1] -= mov
        else:
            pass
    total += 1

print(total)

Submission status: Wrong Answer

Solution code:
n=int(input())

v = []
for i in range(5):
    v.append(int(input()))

print(n//min(v)+5)

Submission status: Wrong Answer

Solution code:
import math

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

ans = math.ceil(n // min(a)) + 4
print(ans)

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:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def SI():
    return input()

def SMI():
    return input().split()

def SRI():
    return list(input().split())

def SCI(n):
    return [ input() for _ in range(n) ]

def SLI(n):
    return [ list(input().split()) for _ in range(n) ]

n = I()
abcde = CI(5)

m = min(abcde)

if m>n:
    ans = 5
else:
    ans = (n//m) + 1 + 4
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def SI():
    return input()

def SMI():
    return input().split()

def SRI():
    return list(input().split())

def SCI(n):
    return [ input() for _ in range(n) ]

def SLI(n):
    return [ list(input().split()) for _ in range(n) ]

n = I()
abcde = CI(5)

m = min(abcde)

if m>=n:
    ans = 5
else:
    ans = (n//m) + 1 + 4
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import deque
from heapq import heapify,heappop,heappush,heappushpop
from copy import copy,deepcopy
from itertools import product,permutations,combinations,combinations_with_replacement
from collections import defaultdict,Counter
from bisect import bisect_left,bisect_right
# from math import gcd,ceil,floor,factorial
# from fractions import gcd
from functools import reduce
from pprint import pprint

INF = float("inf")

def mycol(data,col):
    return [ row[col] for row in data ]

def mysort(data,col,reverse_flag):
    data.sort(key=lambda x:x[col],reverse=reverse_flag)
    return data

def mymax(data):
    M = -1*float("inf")
    for i in range(len(data)):
        m = max(data[i])
        M = max(M,m)
    return M

def mymin(data):
    m = float("inf")
    for i in range(len(data)):
        M = min(data[i])
        m = min(m,M)
    return m

def mycount(ls,x):
    # lsはソート済みであること
    l = bisect_left(ls,x)
    r = bisect_right(ls,x)
    return (r-l)

def myoutput(ls,space=True):
    if space:
        if len(ls)==0:
            print(" ")
        elif type(ls[0])==str:
            print(" ".join(ls))
        elif type(ls[0])==int:
            print(" ".join(map(str,ls)))
        else:
            print("Output Error")
    else:
        if len(ls)==0:
            print("")
        elif type(ls[0])==str:
            print("".join(ls))
        elif type(ls[0])==int:
            print("".join(map(str,ls)))
        else:
            print("Output Error")

def I():
    return int(input())

def MI():
    return map(int,input().split())

def RI():
    return list(map(int,input().split()))

def CI(n):
    return [ int(input()) for _ in range(n) ]

def LI(n):
    return [ list(map(int,input().split())) for _ in range(n) ]

def SI():
    return input()

def SMI():
    return input().split()

def SRI():
    return list(input().split())

def SCI(n):
    return [ input() for _ in range(n) ]

def SLI(n):
    return [ list(input().split()) for _ in range(n) ]

n = I()
abcde = CI(5)

m = min(abcde)

ans = (n//m) + 1 + 4
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for i in range(5)]
if min(a) >= n:
    print(5)
else:
    print(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 sys
#from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def main():
    n = int(stdin.readline().rstrip())
    a = int(stdin.readline().rstrip())
    b = int(stdin.readline().rstrip())
    c = int(stdin.readline().rstrip())
    d = int(stdin.readline().rstrip())
    e = int(stdin.readline().rstrip())
    m = min(a,b,c,d,e)
    if n%m == 0:
        u = n/m
    else:
        u = n//m + 1
    print(4 + u)

main()

Submission status: Wrong Answer

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