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: Accepted

Solution code:
from math import ceil
n = int(input())
a = [int(input()) for _ in range(5)]

print(ceil(n/min(a)) + 4)

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
x = [I() for _ in range(5)]
m = min(x)
print((n-1)//m+1+4)

Submission status: Accepted

Solution code:

def resolve():
    '''
    code here
    '''
    import math
    N = int(input())
    trans_list = [int(input()) for _ in range(5)]

    min_tp = min(trans_list)
    
    print(math.ceil(N/min_tp) + 4)

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

mini=math.ceil(N/min(A,B,C,D,E))

print(mini+4)

Submission status: Accepted

Solution code:
import math
n = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
work = min(A, B, C, D, E)
if work > n:
    work = n
print(4+math.ceil(n/work))

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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)//minimum + 4)

Submission status: Accepted

Solution code:
def main():
    import math
    n, *p = map(int, open(0).read().split())
    x = min(p)
    t = math.ceil(n / x)
    ans = 5 + (t - 1)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a = []
mi = 10**20
for _ in range(5):
    i_ = int(input())
    mi = min(mi, i_)
print((n + mi - 1) // mi + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

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

print((N+min_move-1) // min_move + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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 = n//mi + (4 if n%mi == 0 else 5)
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

N = int(input())
time = [int(input()) for _ in range(5)]
minV = min(time)
print(math.ceil(N/minV)+4)

Submission status: Accepted

Solution code:
import math

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(math.ceil(n/x)+4)

Submission status: Accepted

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)
print(-(-n//x)+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

n, *abcde = map(int, sys.stdin.read().split())
mi = min(abcde)
ans = abcde.index(mi) + (n + mi - 1) // mi + 5 - abcde.index(mi) - 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    n = int(input())
    a = [int(input()) for _ in range(5)]
    b = min(a)
    if n%b==0:
        print(n//b+4)
    else:
        print(n//b+5)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
n,a,b,c,d,e = map(int, open(0).read().split())
print(math.ceil(n/min(a,b,c,d,e))+4)

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
ct_list = [n,a,b,c,d,e]
for i in range(5):
  if ct_list[i] < ct_list[i+1]:
    ct_list[i+1] = ct_list[i]

if ct_list[5] >= ct_list[4]:
  if n%ct_list[4] == 0:
    print(4+n//ct_list[4])
  else:
    print(5+n//ct_list[4])
else:
  if n%ct_list[5] == 0:
    print(4+n//ct_list[5])
  else:
    print(5+n//ct_list[5])

Submission status: Accepted

Solution code:
import math

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

spent=[A,B,C,D,E]
limit=min(spent)
limit_index=spent.index(limit)
print(math.ceil(N/limit)-1+5)

Submission status: Accepted

Solution code:
N, a,b,c,d,e = [int(input()) for _ in range(6)]
m = min([a,b,c,d,e])
 
print((N//m + bool(N%m))+4)  # N割るmの切上げはboolぶんをたす

Submission status: Accepted

Solution code:
#conding utf-8
N=int(input())
A=[int(input()) for i in range(5)]
if min(A)==1:
  print(int(N/min(A))+4)
else:
  print(int(N/min(A))+5)

Submission status: Accepted

Solution code:
import numpy as np
N=int(input())
A=[int(input()) for i in range(5)]

t=0
x=np.argmin(A)

t+=x

t+=(N+A[x]-1)//A[x]

t+=4-x

print(t)

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = []
    for i in range(5):
        A.append(int(input()))
    A.sort()
    if(N > A[0]):
        if(N % A[0] != 0):
            cnt = N//A[0]+1
        else:
            cnt = N//A[0]
    else:
        cnt = 1    
    print(cnt+4)
main()

Submission status: Accepted

Solution code:
N = int(input())
A = [0]*5
for i in range(5):
    A[i] = int(input())
    
if N % min(A) != 0:
    print(N//min(A)+5)
else:
    print(N//min(A)+4)

Submission status: Accepted

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)

time = 0
if N%X !=0:
    time += N//X +5
else:
    time += N//X+4
print(time)

Submission status: Accepted

Solution code:
import math

N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
#%%
neck = min([A, B, C, D, E])
total = 4 + math.ceil(N/neck)

print(total)

Submission status: Accepted

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:
    print(5)
else:
    n-=m
    ans=n//m
    if n%m:
        ans+=1
    print(5+ans)

Submission status: Accepted

Solution code:
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

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

def input_list_str():
  return list(map(str, input().split()))

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

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

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def main():
  n = int(input())
  nums = []
  for i in range(5):
    nums.append(int(input()))
  
  min_num = min(nums)
  print(math.ceil(n/min_num)+4)
  
import math
import fractions
import collections
import itertools
from functools import reduce
main()

Submission status: Accepted

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) + 4
print(T)

Submission status: Accepted

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
lis = [a, b, c, d, e]
x = min(lis)
if n%x == 0:
    x = n//x
else:
    x = n//x + 1
print(5 + x-1)

Submission status: Accepted

Solution code:
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

N = int(input())
X = min(int(input()) for _ in range(5))
print((N + X - 1) // X + 4)

Submission status: Accepted

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

def main():
    n = int(input())
    bn = 10**16
    for i in range(5):
        bn = min(bn, int(input()))
    print(-(-n // bn) + 4)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

def main():
    n = int(input())
    bn = 10**16
    for i in range(5):
        bn = min(bn, int(input()))
    if bn == 1:
        print(n // bn + 4)
    else:
        print(n // bn + 5)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

if min(li) >= n:
    print(5)
else:
    print(math.ceil(n/min(li)) + 4)

Submission status: Accepted

Solution code:
from math import ceil, floor
#ceil()  # 切り上げ。常にup
#floor()  # 切り捨て。常にdown
#int()  # 常に0に近く（正負で挙動違う）
#round(f),  round(f, 1)  # 四捨五入（第二引数で小数点桁数を指定）
n = int(input())
l = [int(input()) for _ in range(5)]
print(ceil(n / min(l)) + 4)

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print, min
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    N = input_number()
    ls = []
    for i in range(5):
        ls.append(input_number())
    mini = min(ls)
    cnt = -(-N//mini)+4
    print(cnt)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
x=[A,B,C,D,E]
mi=A
for i in range(5):
 if mi<x[i]:
  x[i]=mi
 else:
  mi=x[i]
print(math.ceil(N/mi)+4)

Submission status: Accepted

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

print(math.ceil(n / min(l))+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

N = int(input())
A = [int(input()) for _ in range(5)]

print(ceil(N / min(A)) + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil

N = int(input())
ABCDE = [0] * 5
for _ in range(5):
    ABCDE[_] = int(input())

neck = min(ABCDE)
neck_index = ABCDE.index(neck)

ans = ceil(N / neck) + 4
print(ans)

Submission status: Accepted

Solution code:
# import bisect
# from collections import Counter, deque
# import copy
# from fractions import gcd
# from functools import reduce
# from itertools import accumulate, permutations, combinations, combinations_with_replacement, groupby, product
# import math
# import numpy as np
# import sys
# sys.setrecursionlimit(10**9)

def resolve():
    N = int(input())
    A = [int(input()) for i in range(5)]

    print(4 + -(-N // min(A)))


resolve()

Submission status: Accepted

Solution code:
import math
N = int(input())
L = []
for i in range(5):
  A = int(input())
  L.append(A)
'''
#bottleneck:一番細い所(i,i+1)を考える。(X = min(L))
すると、1分あたりにX人運べる計算になる。Y分あたりにN人より N/Y = X so Y = ceil(N/X)
よってceil(N/X)がその細い所を全員通らせるのにかかる時間。
+スタートしてから細い所を使わない時間 = i-1
+全員が乗り終わってからゴールまで経過する時間 = 5-i
(1人ずつ通す　→　最後の人は遅くとも、5-i分前に乗ってないと。)
'''
print(math.ceil(N/min(L)) + 4)

Submission status: Accepted

Solution code:
n,*p=map(int,open(0));print((~-min(p)+n)//min(p)+4)

Submission status: Accepted

Solution code:
import math

N = int(input())
T = [int(input()) for _ in range(5)]

t_min = min(T)
bottle = math.ceil(N / t_min)
print(5 + (bottle - 1))

Submission status: Accepted

Solution code:
import math

n = int(input())
trans = sorted(list(int(input()) for _ in range(5)))

ans = math.ceil(n / trans[0]) + 4
print(ans)

Submission status: Accepted

Solution code:
import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
atoe = [a, b, c, d, e]
for _ in range(5):
    for i in range(4):
        if atoe[i]<atoe[i+1]:
            atoe[i+1] = atoe[i]

print(   math.ceil(n/min(atoe))+4    )

Submission status: Accepted

Solution code:
n = int(input())
arr = [0] * 5
min_p = 10 ** 16
mi = -1
for i in range(5):
    arr[i] = int(input())
    if arr[i] < min_p:
        min_p = arr[i]
        mi = i

import math
print(4 + math.ceil(n / min_p))

Submission status: Accepted

Solution code:
import math

N = int(input())
T = [0] * 5
for i in range(5):
    T[i] = int(input())
ans = math.ceil(N / min(T)) + 4
print(ans)

Submission status: Accepted

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(math.ceil(n/f)+4)

Submission status: Accepted

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

print(4 + max([(n + i - 1) // i for i in a]))

Submission status: Accepted

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(math.ceil(n/f)+4)

Submission status: Accepted

Solution code:
n = int(input())
list_L = [int(input()) for _ in range(5)]
list_L.sort()
ans = 0
ans += 5 + n//list_L[0]

if n%list_L[0] == 0:
    ans -= 1

print(ans)

Submission status: Accepted

Solution code:

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

m=min(trans)
if n%m==0:
  print(n//m+4)
else:
  print(n//m+5)

Submission status: Accepted

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

ke=[a,b,c,d,e]
m=min(ke)
if n%m==0:
  print(n//m+4)
else:
  print(n//m+5)

Submission status: Accepted

Solution code:
import sys
import os
import math


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, *TIME = [int(sys.stdin.readline().rstrip()) for _ in range(6)]

    m = min(TIME)
    ret = math.ceil(N / m) + TIME.index(m)
    ret += len(TIME) - TIME.index(m) - 1

    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
ans=0
for i in range(5):
    ans+=1
    a=int(input())
    if N%a==0:
        A=int(N//a)
    else:
        A=int(N//a)+1
    ans=max(ans,A+i)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    N = int(input())
    ABCDE = [int(input()) for _ in range(5)]
    a = min(ABCDE)

    print(4 - (-N // a))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

answer=-(-N//min(A))

print(answer+4)

Submission status: Accepted

Solution code:

import numpy as np


def submit():
    n = int(input())
    trans_max = [int(input()) for _ in range(5)]
    trans_min = np.min(trans_max)    

    # 何グループで最終地点に到達するか
    group_count = n // trans_min + int(n % trans_min > 0)
    print(5 + group_count - 1)        


if __name__ == "__main__":
    submit()

Submission status: Accepted

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)) + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import math
n=int(input())
l=[int(input()) for _ in range(5)]
print(math.ceil(n/min(l)+4))

Submission status: Accepted

Solution code:
import math
N = int(input())

loads = []
for _ in range(5):
  loads.append(int(input()))
min_load = min(loads)
count = math.ceil(N/min_load)
print(4 + count)

Submission status: Accepted

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

m = min(ride)

if n%m != 0:
    print(5 + n//m)
else:
    print(4 + n//m)

Submission status: Accepted

Solution code:
import math

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

way = [A, B, C, D, E]


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

Submission status: Accepted

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

Submission status: Accepted

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

bottleneck = min(A)
ans = (N+bottleneck-1)//bottleneck + 4
print(ans)

Submission status: Accepted

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

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

import math

min_p = math.ceil(N / min_p)
print(min_p+4)

Submission status: Accepted

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)

ans = 4 + (N + bottleneck - 1) // bottleneck

print(ans)

Submission status: Accepted

Solution code:
def main():
  import sys
  input = sys.stdin.readline
  import math
  l=[int(input()) for _ in [0]*6]
  print(5+math.ceil((max(l[0]-min(l[1:]),0))/min(l[1:])))
  
if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
print(abs(-int(input())//min(int(input()) for _ in range(5)))+4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(-(-n//min(mv))+4)

Submission status: Accepted

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

print(-(-N//min(A))+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#n=int(input())
#n,m=map(int,input().split())
#sl=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import bisect_left,bisect_right,insort
input = sys.stdin.readline

def main():
    n=int(input())
    x=[int(input()) for _ in range(5)]
    print(-(-n//min(x))+4)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding:utf-8 -*-

from math import ceil

def main():
  n = int(input())
  xs = [int(input()) for _ in range(5)]
  print(ceil(n / min(xs)) + 4)

if __name__=='__main__':
  main()

Submission status: Accepted

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:
    print(n//m + 4)
else:
    print(n//m + 5)

Submission status: Accepted

Solution code:
N, A, B, C, D, E = [int(input()) for _ in range(6)]

dists = [A, B, C, D, E]
counts = []
total = 0
max_count = 1
for dist in dists:
  count = (N + dist -1) //dist
  counts.append(count)
  total += 1
  if count > max_count:
    total += count - max_count
    max_count = count
print(total)

Submission status: Accepted

Solution code:
import math

n = int(input())
cap = []
for _ in range(5):
    cap.append(int(input()))

print(math.ceil(n/min(cap))+4)

Submission status: Accepted

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

min_capa = min(A,B,C,D,E)
neck_pass_time = max(1, (N + min_capa - 1) // min_capa)
ans = 4 + neck_pass_time
print(ans)

Submission status: Accepted

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

print(-(-N//min(q))+4)

Submission status: Accepted

Solution code:
n = int(input())
min = float('inf')
for _ in range(5):
    i = int(input())
    if min > i:
        min = i

if n % min == 0:
    ans = n // min + 4
else:
    ans = n // min + 5

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=int(input())
B=int(input())
C=int(input())
D=int(input())
E=int(input())
s=[A,B,C,D,E]
x=0
if N%min(s)==0:
  x=N//min(s)
else:x=(N//min(s))+1
print(x+4)

Submission status: Accepted

Solution code:
import math
#import bisect
#import numpy as np
#import itertools
#import copy
import sys
from collections import deque

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    n = int(input())
    a = [0] * 5
    for i in range(5):
        a[i] = int(input())

    city = [0] * 6
    city[0] = n

    amin = INF
    for i in range(5):
        if amin > a[i]:
           amin = a[i]
           idx = i

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

print(math.ceil(n/min(mov))+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math
n = int(input())
capa = [int(input()) for _ in range(5)]
print(4+math.ceil(n/min(capa)))

"""
ans = 4 #１セキで行けた時のタイム
real_pas = 10*15+1 # i に来るまでの一隻あたりの乗客数
ship_num = 1 #　合計で何回輸送するか？= 時間
for i in range(5):
    if capa[i] > real_pas:
        pass
    else:
        ship_num = math.ceil(n/capa[i])
        real_pas = capa[i]
        #print(i,ship_num,real_pas)
print(ans+ship_num)"""

Submission status: Accepted

Solution code:
import math

n = int(input())
caps = [int(input()) for _ in range(5)]
cap = min(caps)

if cap > n:
    print(5)
else:
    pass_time = math.ceil(n / cap)
    print(pass_time + len(caps) - 1)

Submission status: Accepted

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

tran = [a, b, c, d, e]
ans = math.ceil(n / min(tran)) + 4
print(ans)

Submission status: Accepted

Solution code:
def main():
    n = int(input())

    i = 0
    capacity = []
    for _ in range(5):
        c = int(input())
        capacity.append(c)
        i += 1

    l = (len(capacity) + 1)
    city = [0] * l
    city[0] = n

    p0 = 0
    for i, c in enumerate(capacity):
        p = i + 1 + (n - 1) // c
        p0 = max(p, p0 + 1)

    print(p0)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
abc = []
ans = 0

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

minabc = min(abc)
ans += n//minabc
if n % minabc != 0:
    ans += 1
print(4 + ans)

Submission status: Accepted

Solution code:
n = int(input())
abc = []
ans = 0

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

minabc = min(abc)
ans += n//minabc
if n % minabc != 0:
    ans += 1

if minabc >= n :
    print(5)
else :
    print(4 + ans)

Submission status: Accepted

Solution code:
import math
n=int(input())
l=[0]*5
for i in range(5):
  l[i]=int(input())
l.sort()
if l[0]>=n:
  print(5)
else:
  print(math.ceil(n/l[0])+4)

Submission status: Accepted

Solution code:
import math
a=[int(input()) for _ in range(6)]
flag=a.index(min(a))
ans=4+math.ceil(a[0]/min(a))
print(ans)

Submission status: Accepted

Solution code:
#123_C
n=int(input())
lim=[int(input()) for _ in range(5)]

print(-(-n//min(lim))+4)

Submission status: Accepted

Solution code:
n=int(input())
risok = float('inf')
for _ in range(5):
    a = int(input())
    risok = min(risok, a)
#print(risok)

if n%risok==0 and risok < n:
    print(4+n//risok)
else:
    print(5+n//risok)

Submission status: Accepted

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

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

mi = min(a_d)
num = n//mi

if n%mi != 0:
    num += 1

print(num+4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

N = int(input().strip())
pas_list = [int(input().strip()) for _ in range(5)]

count = (  -(-N // min(pas_list)) ) -1+5
print(count)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(4 + (n+min(ae)-1) // min(ae))

Submission status: Accepted

Solution code:
def need(x,y):
    if x%y==0:
        answer = x//y
    else:
        answer = x//y + 1

    return answer

n = int(input())
move_lst = [int(input()) for _ in range(5)]
min_move = min(move_lst)

answer = need(n, min_move) + 4
print(answer)

Submission status: Accepted

Solution code:
from math import ceil
n, *A = map(int, open(0).readlines())
print(4 + max(ceil(n / a) for a in A))