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())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
k=min(a,b,c,d,e)
print(n//k + 5)

Submission status: Wrong Answer

Solution code:
n=int(input())
t=[int(input()) for i in range(5)]
k=0
for i in range(5):
    k=max(k,(n//t[i]))
print(5+k)

Submission status: Wrong Answer

Solution code:
N = int(input())
T = []
for i in range(5):
    T.append(int(input()))
k = 0
for i in range(4):
    if N % T[i] == 0:
        k = max(k, N//T[i])
    else:
        k = max(k, N//T[i] + 1)
print(4 + k)

Submission status: Wrong Answer

Solution code:
N = int(input())
T = []
for i in range(4):
    T.append(int(input()))
k = 0
for i in range(4):
    if N % T[i] == 0:
        k = max(k, N//T[i])
    else:
        k = max(k, N//T[i] + 1)
print(4 + k)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
x = [int(input()) for _ in range(5)]
p = min(x)
q = n//p
print(q+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())
bottle = min([A, B, C, D, E])
if bottle < N:
  print(N//bottle+5)
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())

transportations = [A, B, C, D, E]
minCap = min(transportations)
minIdx = transportations.index(minCap)
transportations.pop(minIdx)
print(transportations)

time = N // minCap
if N % minCap != 0:
	time += 1
	
time += 4

print(time)

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:
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
res=0
if n>a:
  res+=n//a
  n=a
if n>b:
  res+=n//b
  n=b
if n>c:
  res+=n//c
  n=c
if n>d:
  res+=n//d
  n=d
if n>e:
  res+=n//d
  n=e
print(res+5)

Submission status: Wrong Answer

Solution code:
n = int(input())
tp = []
tmp = 10**9
for _ in range(5):
    a = int(input())
    if tmp > a:
        tmp = a
    tp.append(a)
if tmp >= n:
    print(5)
    exit()

cnt = n//tmp
mod = n%tmp

if mod > 0:
    print(5+cnt)
else:
    print(5+cnt-1)

Submission status: Wrong Answer

Solution code:
n = int(input())
tp = []
tmp = 10**9
for _ in range(5):
    a = int(input())
    if tmp > a:
        tmp = a
    tp.append(a)

cnt = n//tmp
mod = n%tmp

if mod > 0:
    print(5+cnt)
else:
    print(5+cnt-1)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
import decimal
import itertools
from itertools import product
from functools import reduce
def input():
    return sys.stdin.readline()[:-1]
def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b

def main():
    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 = 5
    ans += N // x
    if N % x == 0:
        ans -= 1
    print(5 + (N // x))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math
import decimal
import itertools
from itertools import product
from functools import reduce
def input():
    return sys.stdin.readline()[:-1]
def sort_zip(a:list, b:list):
    z = zip(a, b)
    z = sorted(z)
    a, b = zip(*z)
    a = list(a)
    b = list(b)
    return a, b

def main():
    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)

    print(5 + (N // x))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1

N = [int(input()) for _ in range(5)]
print((N[0]-1)//min(N[1:])+5)

Submission status: Wrong Answer

Solution code:
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1
N = int(input())
C = [int(input()) for _ in range(5)]
L = [N]+[0]*5
for t in range(5):
    tmp = [min(l,c) for l,c in zip(L[:5],C)]
    for j in range(5):
        L[j] -= tmp[j]
        L[j+1] += tmp[j]
ans = 5
D = [C[0]]
m = C[0]
for i in range(1,5):
    if m<=C[i]:
        D.append(0)
    else:
        D.append(m-C[i])
        m = C[i]
for i in range(5):
    t = (L[i]-1)//C[i]+1
    for j in range(i+1,5):
        L[j] += t*D[j]
    ans += t
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from math import *

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1
N = int(input())
C = [int(input()) for _ in range(5)]
L = [N]+[0]*5
for t in range(5):
    tmp = [min(l,c) for l,c in zip(L[:5],C)]
    for j in range(5):
        L[j] -= tmp[j]
        L[j+1] += tmp[j]
ans = 5
for i in range(5):
    t = (L[i]-1)//C[i]+1
    for j in range(i+1,5):
        L[j] += t*max(0,C[j-1]-C[j])
    ans += t
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())
from math import ceil
a = ceil(N/A)
F = [A,B,C,D,E]
for i in range(1,5):
    if F[i-1] <= F[i]:
        a += 1
    else:
        b = ceil(N/F[i])
        a += b+1-i
print(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())
from math import ceil
a = ceil(N/A)
F = [B,C,D,E]
for i in F:
    b = ceil(N/i)
    if a >= b:
        a += 1
    else:
        a += b-a+1
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [int(input()) for _ in range(5)]
ind = 0
minimum = 10 ** 18
for i in range(5):
    minimum = min(minimum, a[i])
print((n + minimum) // minimum + 4)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
x=[]
for i in range(5):
  x.append(int(input()))
if n==min(x):
  print(5)
else:
  print(5+math.ceil(n/min(x)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
f=lambda:int(input())
N=f()
D=[0]*5
for i in range(5):
    D[i]=f()

m=min(D)
g=-min(1,~N//m)

print(5+g-1)

Submission status: Wrong Answer

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

res = 5
for i in range(5):
  if N > mobile[i]:
    res += math.ceil(N/mobile[i])-1
    N = mobile[i]

print(res)

Submission status: Wrong Answer

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

res = 5
for i in range(5):
  if N > mobile[i]:
    res += N//mobile[i]
    N = mobile[i]

print(res)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
m = [int(input()) for _ in range(5)]
min_m = min(m)

x = math.floor(n/min_m) + 5

if n == min_m:
    print(x-1)
else:
    print(x)

Submission status: Wrong Answer

Solution code:
import math

n = int(input()) + 0.1
m = [int(input()) for _ in range(5)]
min_m = min(m)

print(math.floor(n/min_m) + 5)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
m = [int(input()) for _ in range(5)]
min_m = min(m)

print(math.floor(n/min_m) + 5)

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
mi=min(a)
if(a[0]==mi):print(5)
else: print(5+(a[0]//mi))
#pythonではなくpython3で実行して

Submission status: Wrong Answer

Solution code:


def main():
    n = int(input())
    csr = []
    for _ in range(5):
        csr.append(int(input()))
    print(5+n//min(csr))


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
mi=min(a[1:])
if(a[0]<=mi):print(5)
else: print(5+(a[0]//mi))
#pythonではなくpython3で実行して

Submission status: Wrong Answer

Solution code:
a = [int(input()) for i in range(6)]
mi=min(a[1:])
if(a[0]<=mi):print(5)
else: print(5+(a[0]//mi+a[0]%mi-1))
#pythonではなくpython3で実行して

Submission status: Wrong Answer

Solution code:


def main():
    n = int(input())
    lst = []
    for _ in range(5):
        lst.append(int(input()))
    m = n
    ans = 5
    for i in range(5):
        if m // lst[i] > 0:
            ans += m // lst[i]
            m = lst[i]
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:


def main():
    n = int(input())
    lst = []
    for _ in range(5):
        lst.append(int(input()))
    m = n
    ans = 5
    for i in range(4):
        if m // lst[i] > 0:
            ans += m // lst[i]
            m = lst[i]
    print(ans)


if __name__ == "__main__":
    main()

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)
if n%m!=0:
  t = n//m +5
else:
  t = n/m +4
print(t)

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)
t = n//m +5
print(t)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
x = [int(input()) for i in range(5)]
d = n // min(x)
print(d+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())
t = 0
if n%A!=0:
  t+=n//A
  n=min(n, A)
else:
  if n//A-1>=0:
    t+=n//A-1
  n=min(A, n)
if n%B!=0:
  t+=n//B
  n=min(n, B)
else:
  if n//B-1>=0:
    t+=n//B-1
  n=min(n, B)
if n%C!=0:
  t+=n//C
  n=min(n, C)
else:
  if n//C-1>=0:
    t+=n//C-1
  n=min(n, C)
if n%D!=0:
  t+=n//D
  n=min(n, D)
else:
  if n//D-1>=0:
    t+=n//D-1
  n=min(n, D)
if n%E!=0:
  t+=n//E
  n=min(n, E)
else:
  if n//E-1>=0:
    t+=n//E-1
  n=min(n, E)
  
print(5+t)

Submission status: Wrong Answer

Solution code:
n = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
t = 0
if n%A!=0:
  t+=n//A
  n=min(n, A)
else:
  if n//A-1>0:
    t+=n//A-1
  n=min(A, n)
if n%B!=0:
  t+=n//B
  n=min(n, B)
else:
  if n//B-1>0:
    t+=n//B-1
  n=min(n, B)
if n%C!=0:
  t+=n//C
  n=min(n, C)
else:
  if n//C-1>0:
    t+=n//C-1
  n=min(n, C)
if n%D!=0:
  t+=n//D
  n=min(n, D)
else:
  if n//D-1>0:
    t+=n//D-1
  n=min(n, D)
if n%E!=0:
  t+=n//E
  n=min(n, E)
else:
  if n//E-1>0:
    t+=n//E-1
  n=min(n, E)
  
print(5+t)

Submission status: Wrong Answer

Solution code:
n = int(input())

x = float('inf')
for _ in range(5):
    a = int(input())
    x = min(x,a)

print(n//x + 5)

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def SL(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [SL() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

def perm(n, r): return math.factorial(n) // math.factorial(r)
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))

def make_list(n, *args, default=0): return [make_list(*args, default=default) for _ in range(n)] if len(args) > 0 else [default for _ in range(n)]

sys.setrecursionlimit(1000000)
dire, dire8 = [[1, 0], [0, 1], [-1, 0], [0, -1]], [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
alphabets, ALPHABETS = "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
MOD, INF = 1000000007, float("inf")

def main():
    N = I()
    ABCDE = IR(5)
    print(5 + N // min(ABCDE))

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
import numpy as np
N,*T = map(int,open(0).read().split())

X = np.array(T).min()

print(5+math.floor(N/float(X)))

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+n//(min(a,b,c,d,e))
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = [int(input()) for i in range(5)] #A[i]:amount of people able to be carried at once from i to i+1
B = [0] * 6 #B[i]:amount of people at i now 
cnt = 0

#max people able to be transported in m minutes
P = [0] * 9
B[0] = 10**15
for m in range(9):
    for i in range(5,0,-1):
        B[i] += min(A[i-1],B[i-1])
        B[i-1] -= min(A[i-1],B[i-1])
        
    P[m] = B[5]
    cnt += 1
#print(P)
x = N // P[-1]
y = N % P[-1]
for j in range(7,2,-1):
    if P[j]<y:
        time = 5 * x + j + 2
        print(time)
        exit(0)

Submission status: Wrong Answer

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

import numpy as np

def main():
	n=II()
	A=[II() for _ in range(5)]
	ans=0

	for i in A:
		ans=max(ans,-(-n)//i)

	ans+=5

	print(ans)









if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return input().rstrip().decode()
def II(): return int(input())
def FI(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

import numpy as np

def main():
	n=II()
	A=[II() for _ in range(5)]
	ans=0

	for i in A:
		ans=max(ans,n//i)

	ans+=5

	print(ans)









if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, *a = map(int, open(0).read().split())
print(5 + n // min(a))

Submission status: Wrong Answer

Solution code:
N = int(input())

mylist = []
for i in range(5):
    mylist.append(N//int(input()))
print(5+max(mylist))

Submission status: Wrong Answer

Solution code:
n = int(input())
T=[]
for i in range(5):
    T.append(int(input()))
mt=min(T)
ans = n//mt-1 if mt%n==0 else n//mt
ans += 5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
X = [int(input()), int(input()), int(input()), int(input()), int(input())]

print(int(N/min(X)) + 5)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
ans = 5

for i in range(5):
    a.append(int(input()))
    
for i in a:
    if n>i:
        if n%i == 0:
            ans += n//i-1
        else:
            ans += n//i
        n = n%i
        
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
ans = 1

for i in range(5):
    a.append(int(input()))
    
for i in a:
    if n>i:
        if n%i == 0:
            ans += n//i
        else:
            ans += n//i+1
        n = n%i
    else:
        ans += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
for _ in range(5):
    a.append(int(input()))
min_num = a[0]
for i in range(5):
    if min_num > a[i]:
        min_num = a[i]
print(n // min_num + 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())
X = min(A, B, C, D, E)
if X >= N:
  print(5)
else:
  print(5+N//X)

Submission status: Wrong Answer

Solution code:
n,*cap=map(int,open(0).read().split())

m=min(cap)

print(5+n//m)

Submission status: Wrong Answer

Solution code:
import numpy as np
N = int(input())
transport = [int(input()) for _ in range(5)]
print(int(N / np.min(transport) + 5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
L = []
for _ in range(6):
  L.append(int(input()))

if L[0] <= min(L[1:]):
  print(5)
else:
  print(5+L[0]//min(L[1:]))

Submission status: Wrong Answer

Solution code:
L = []
for _ in range(6):
  L.append(int(input()))

print(5+L[0]//min(L[1:]))

Submission status: Wrong Answer

Solution code:
#! python3
#  solve_122A.py

#import time

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

"""
t = [0,A,B,C,D,E]
l = [0,N,0,0,0,0,0]

ans = 0
for i in range(10**15):
    for place in range(5,0,-1):
        if l[place] > 0:
            p = l[place]
            l[place] -= min(p,t[place])
            l[place+1] += min(p,t[place])
    
    ans += 1
    print(l)
    time.sleep(1)
    if l[6] == N:
        print(ans)
        break
"""

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 5
lst = [int(input()) for _ in range(5)]
tmp = n
for i in range(5):
    tmp = (tmp+lst[i]-1) // lst[i]
    if tmp == 1:
        continue
    ans += tmp - 1
    tmp = lst[i]

print(ans)

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 = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

print(n // m + 5)

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

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

if bn == n:
    print(5)
    exit()

print((n // bn) + 5)

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

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

print((n // bn) + 5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main2():
    N=int(input())
    #各交通機関の移動人数
    t=[int(input()) for _ in range(5)]
    MIN=min(t)
    m=N//MIN+1+4
    print(m)

if __name__=="__main__":
    main2()

Submission status: Wrong Answer

Solution code:
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)!=1:
    print(n//(min(a,b,c,d,e))+4)
else:
    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())
x=[int(input()) for i in range(5)]

bottle_neck=10**15+10
bottle_neck_index=0

for i in range(5):
    if bottle_neck>x[i]:
        bottle_neck_index=i
        bottle_neck=x[i]

if n<=bottle_neck:
    ans=0
else:
    ans=n//bottle_neck
ans=ans+5
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
transportation = [int(input()) for i in range(5)]
bottleneck = min(transportation)
ans = 0
if bottleneck >= n:
	ans = 5
else:
	ans = math.ceil((n-bottleneck)/2)+5
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
transportation = [int(input()) for i in range(5)]
bottleneck = min(transportation)
ans = math.ceil((n-bottleneck)/2)+5
print(ans)

Submission status: Wrong Answer

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

M = min(W)
print(N // M + 5)

Submission status: Wrong Answer

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

def main():
    N = int(input())
    City = [int(input()) for i in range(5)]
    cnt = N//min(City)+5
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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)
t = n // mi
print(5 + t)

Submission status: Wrong Answer

Solution code:
import math
N = [int(input())]
N.extend([int(input()) for X in range(0,5)])
MIN  = N[0]
Time = 0
for C in range(1,6):
    if MIN<=N[C]:
        Time += 1
    else:
        Time += math.ceil(MIN/N[C])
        MIN = N[C]
print(Time)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
Cap = [int(input()) for X in range(0,5)]
MII = Cap.index(min(Cap))
if MII==0:
    Time = int(math.ceil(N/Cap[0])+4)
else:
    SMI = Cap.index(min(Cap[0:MII]))
    Time = int(math.ceil(N/Cap[0])+math.ceil(Cap[SMI]/Cap[MII])+3)
print(Time)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
Cap = [int(input()) for X in range(0,5)]
MIN = Cap.index(min(Cap))
if MIN==0: print(int(math.ceil(N/Cap[0])+4))
else: print(int(math.ceil(N/Cap[0])+math.ceil(Cap[MIN-1]/Cap[MIN])+3))

Submission status: Wrong Answer

Solution code:
n = int(input())
city = [int(input()) for _ in range(5)]
if n <= min(city):
    print(5)
    exit()
print(round(n/min(city))+4)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy,deepcopy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(map(int,input().split()))
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
a = [INT() for i in range(5)]

m = n
t = [0]*6
for i in range(5):
    if a[i] >= m:
        t[i+1] = t[i]+1
    else:
        t[i+1] = min(t[i]+(m+a[i]-1)//a[i], i+(n+a[i]-1)//a[i])
        m = a[i]
print(t[5])

Submission status: Wrong Answer

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
a = [INT() for i in range(5)]

m = n
t = [0]*6
for i in range(5):
    if a[i] >= m:
        t[i+1] = max(t[i]+1, i+(n+a[i]-1)//a[i])
    else:
        t[i+1] = max(t[i]+(m+a[i]-1)//a[i], i+(n+a[i]-1)//a[i])
        m = a[i]
print(t[5])

Submission status: Wrong Answer

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
a = [INT() for i in range(5)]

m = n
t = [0]*6
for i in range(5):
    if a[i] >= m:
        t[i+1] = t[i]+1
    else:
        t[i+1] = max(t[i]+(m+a[i]-1)//a[i],i+(n+a[i]-1)//a[i])
        m = a[i]
print(t[5])

Submission status: Wrong Answer

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
a = [INT() for i in range(5)]

m = n
t = [0]*5
for i in range(5):
    if a[i] >= m:
        t[i] = 1
    else:
        t[i] = (m+a[i]-1)//a[i]
        m = a[i]
print(sum(t))