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
 
info = [int(input()) for i in range(6)]
listdesu = []
for i in range(1,6):
  listdesu.append(ceil(info[0]/info[i]))
print(max(listdesu)+4)

Submission status: Accepted

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

Submission status: Accepted

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

timer = math.ceil(int(n)/min(trans))+4

print(timer)

Submission status: Accepted

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

print((n - 1) // min(a) + 5)

Submission status: Accepted

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

min_trans = [min(trans_list),trans_list.index(min(trans_list))]

if min_trans[0]>=N :
    print(5)
else:
    syou, amari = divmod(N,min_trans[0])
    if amari !=0 :
        print(syou+1+4)
    else:
        print(syou+4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

minimum = 1e15 + 1

for _ in range(5):
  a = int(input())
  minimum = min(minimum, a)

print(n // minimum + (n % minimum > 0) + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

N = int(input())
nums = [int(input()) for i in range(5)]

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

Submission status: Accepted

Solution code:
import math
 
n = input("")
a = input("")
b = input("")
c = input("")
d = input("")
e = input("")
 
list_i = [float(a),float(b),float(c),float(d),float(e)]
 
num = min(list_i)
count = n / num
 
print(int(math.ceil(count+4)))

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 = int(input())
capacity = [int(input()) for i in range(5)]
classes, mod = divmod(n, min(capacity))
if mod != 0:
    classes += 1
print(5 + classes - 1)

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    t = [int(input()) for _ in range(5)]
    print(solve(n, t))

def solve(n, t):
    m = min(t)
    t = ceil_div(n, m) + len(t) - 1
    return t

def ceil_div(x, y):
    return (x + y - 1) // y

main()

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = []
for i in range(5):
    inp = int(input())
    a.append(inp)
mini = min(a)
time = int(np.ceil(n/mini))
print(time+4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import math

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

ans = math.ceil(N/min(verchile)) + 4

print(int(ans))

Submission status: Accepted

Solution code:
import math
import sys

n, *ns = [int(i) for i in sys.stdin.read().strip().split('\n')]
m = min(ns)

ans = math.ceil(n / m) + 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())
 
g = [a, b, c, d, e]
h = min(g)
p = math.ceil(n / h)
 
print(4 + p)

Submission status: Accepted

Solution code:
def func(a,b):
	return -(-a//b)

N=int(input())
A=[int(input()) for _ in range(5)]
print(4+func(N,min(A)))

Submission status: Accepted

Solution code:
import numpy as np
#int(input())
n=int(input())
ae=[]
for _ in range(5):
    ae.append(int(input()))
ae=np.array(ae)
min_ae=min(ae)
num_ae=-(-n//ae)-1
#num_ae=-(-ae//min_ae)
print(5+max(num_ae))

Submission status: Accepted

Solution code:
n = int(input())

capa_list = [int(input()) for i in range(5)]

min_num = min(capa_list)
min_index = capa_list.index(min(capa_list))


hoge = 0 if n%min_num == 0 else 1

t = (min_index) + (n//min_num + hoge) + (len(capa_list[min_index+1:]))

print(t)

Submission status: Accepted

Solution code:
[N,A,B,C,D,E] = [int(input()) for i in range(6)]
import math
p = math.ceil(N/min([A,B,C,D,E]))
print(4 +p)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
abc = [int(input()) for _ in range(5)]
ans = N//min(abc)
if N%min(abc):
    ans += 1
print(ans+4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math

N = int(input())
a = [int(input()) for i in range(5)] 

mn = min(a)

if mn >= N:
    t = 5
else:
    t = 4 + math.ceil(N / mn)
    
print(t)

Submission status: Accepted

Solution code:
n = int(input())
time = 0
move = []
for i in range(5):
    m = int(input())
    move.append(m)
m = min(move)
time = (n + m - 1) // m + 4
print(time)

Submission status: Accepted

Solution code:
import sys
import math

ns = [int(i) for i in sys.stdin.read().strip().split('\n')]
n = ns[0]
ns = ns[1:]
m = min(ns)

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

Submission status: Accepted

Solution code:
inputs = [int(raw_input()) for i in range(6)]
bn = min(inputs[1:])
print inputs[0] / bn + 4 + (1 if inputs[0] % bn else 0)

Submission status: Accepted

Solution code:
import math


if __name__ == '__main__':
    passed_time = 0
    is_traveling = True

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

    bottle_neck = min(transports)
    print(math.ceil(tourist_count / bottle_neck) + 4)

Submission status: Accepted

Solution code:
people_num = int(input())

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

min_transport_capacity = min(transport_capacity)
time = 4 + (people_num + min_transport_capacity - 1) // min_transport_capacity
print(time)

Submission status: Accepted

Solution code:
#入力を受け取る
n = int(input())
a = []
for i in range (5):
  a += [int(input())]
min = a[0]
for i in range (1,5):
  if min > a[i]:
    min = a[i]
b =n % min
c = n // min
if b == 0:
  t = c + 4
else:
  t = c + 5
print(t)

Submission status: Accepted

Solution code:
N = int(input())
abc = [int(input()) for _ in range(5)]
ans = N//min(abc)
if N%min(abc):
    ans += 1
print(ans+4)

Submission status: Accepted

Solution code:
import math

input_num = [int(input()) for _ in range(6)]
N, place = input_num[0], input_num[1:]

print(math.ceil((N)/min(place)) + len(place)-1)

Submission status: Accepted

Solution code:
import math
min = 10**15
n = float(input())
for i in range(5):
    x = int(input())
    if x < min:
        min = x
print (math.ceil(n/min)+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())

print(math.ceil(N / min(A, B, C, D, E)) + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
s_num = min([int(input()) for i in range(5)])
import math
print(math.ceil(n/s_num)+4)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
mi = 10**16
for _ in range(5):
    s = int(input())
    mi = min(mi, s)

ret = n//mi
if n%mi != 0:
    ret += 1

print(ret + 4)

Submission status: Accepted

Solution code:
people = int(input())
capacities = [int(input()) for _ in range(5)]

print(-(-people // min(capacities)) + 4)

Submission status: Accepted

Solution code:
import numpy as np

# Input
N, A, B, C, D, E = [int(input()) for _ in range(6)]

# Main
waits = [N, 0, 0, 0, 0, 0]
narrowest = min(A,B,C,D,E)
narrowest_id = [A,B,C,D,E].index(narrowest)

t = 4
t += np.ceil(N / narrowest)
print(int(t))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
a = []
for i in range(5):
    tmp = int(input())
    a.append(tmp)

print(int(np.ceil(n / min(a)) +4))

Submission status: Accepted

Solution code:
N = int(input())
minX = 10**20
for i in range(5):
    minX = min(minX, int(input()))
print((N + minX - 1)//minX + 4)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

num.sort()

result = int((N-1)/num[0])+5

print(result)

Submission status: Accepted

Solution code:
import math
n = int(input())
a = [int(input()) for i in range(5)]
MAX = 0
for i,j in enumerate(a):
  most = math.ceil(n / j) + i
  MAX = max(MAX+1,most)
print(MAX)

Submission status: Accepted

Solution code:
N = int(input())
A = [int(input()) for i in range(5)]
A.sort()
D = A[0]
print(((N - A[0]+D-1) // D) + 5)

Submission status: Accepted

Solution code:
import math
N, L = int(input()), [int(input()) for i in range(5)]
ans = 5 if N < min(L) else math.ceil(N / min(L)) + 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())

print(math.ceil(N/min([A,B,C,D,E]) + 4))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

mins = min(x)

print(4 + math.ceil(n/mins))

Submission status: Accepted

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

num = N

if num >= A:
    num = A 

if num >= B:
    num = B

if num >= C:
    num = C

if num >= D:
    num = D

if num >= E:
    num = E

if N % num == 0:
    print(N // num + 4)
else:
    print(N // num + 5)

Submission status: Accepted

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

minVal = pow(10, 15)
minIdx = -1

for i in range(5):
    carry.append(int(input()))
    if carry[i] < minVal:
        minIdx = i
        minVal = carry[i]

k = 0 if N%minVal == 0 else 1
print(N//minVal + 4 + k)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

res = math.ceil(N / min(A)) + 4

print(res)

Submission status: Accepted

Solution code:
import math

n = int(input())

arr=[int(input()),int(input()),int(input()),int(input()),int(input())]

min=arr[0]

for capa in arr:
    if capa < min:
        min = capa

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

Submission status: Accepted

Solution code:
from sys import exit
import math

N = int(input())

capa = [int(input()), int(input()), int(input()), int(input()), int(input())]

time = math.ceil(N / min(capa)) + 4

print(time)

Submission status: Accepted

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

ans = n//min(a) if n%min(a) == 0 else n//min(a)+1
print(ans+4)

Submission status: Accepted

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

m = min(A)
g = (N + m - 1) // m

print(g - 1 + 5)

Submission status: Accepted

Solution code:
from collections import Counter
from functools import reduce
import fractions
import math
import statistics
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]  # LIST INT
def LF(): return [float(x) for x in sys.stdin.readline().split()]  # LIST FLOAT
def LS(): return sys.stdin.readline().split()  # LIST STRING
def MI(): return map(int, sys.stdin.readline().split())  # MAP INT
def II(): return int(sys.stdin.readline())  # INPUT INT
def IS(): return input()  # INPUT STRING
def P(x): return print(x)
def C(x): return Counter(x)
def GCD_LIST(numbers):  # greatest common divisor
    return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers):  # least common multiple
    return reduce(LCM, numbers)
def LCM(m, n):
    return (m * n // fractions.gcd(m, n))


n, a, b, c, d, e, = II(), II(), II(), II(), II(), II()
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())
k=[a,b,c,d,e]

f=min(k)

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

Submission status: Accepted

Solution code:
list1 = []
list2 = []

time = 0
for n in range(6):

    list1.append(int(input()))

list2 = list1[1:]

time = (list1[0] // min(list2))

if (list1[0] % min(list2)) != 0:
    time += 1

time += 4

print int(time)

Submission status: Accepted

Solution code:
N = int(input())
a = [0]*5
for i in range(5):
    a[i] = int(input())
delay = int(N/min(a))
if N%min(a)==0:
    delay -= 1

print(5+delay)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# listの各要素に人数を格納. 一番後ろに全員たどり着いたら終わり

list = [0] * 6
n_move = []
time = 4

N = int(input())

for i in range(5) : 
    n_move.append(int(input()))
    
n_min = min(n_move)

if(N % n_min == 0) : 
    time += N // n_min
else : 
    time += N // n_min + 1

print(time)

Submission status: Accepted

Solution code:
#coding:utf-8
import math
N=input()
m=min(input(),input(),input(),input(),input(),)
def ceildiv(a, b):
    return -(-a // b)
print(ceildiv(N,m) + 4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

def main(inp):
    N=int(next(inp).split()[0])
    cap = [int(next(inp).split()[0]) for _ in range(5)]
    
    time=math.ceil(N/cap[0])
    
    for i in range(1,5):
        if(cap[i-1]<=cap[i]):
            cap[i]=cap[i-1]
            time+=1
#        elif(cap[i-1]>=N):
#            time+=math.ceil(N/cap[i])
        else: time+=math.ceil(N/cap[i])-math.ceil(N/cap[i-1])+1
            
    return time
  
print(main(sys.stdin))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
move = [int(input()) for i in range(5)]
div,mod = divmod(n,min(move))
if mod == 0:
    print(div + 4)
else:print(div + 5)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
v = []
for i in range(6):
    v.append(int(input()))

n = v[0]
v = np.array(v[1:])
min = np.min(v)

res = (n-1) // min + 5
print(res)

Submission status: Accepted

Solution code:
import sys,heapq
from collections import deque,defaultdict
printn = lambda x: sys.stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
def ddprint(x):
  if DBG:
    print(x)

n = inn()
a = inn()
b = inn()
c = inn()
d = inn()
e = inn()
m = min([a,b,c,d,e])
print(5+(n-1)//m)

Submission status: Accepted

Solution code:
import math
 
a = [int(input()) for i in range(6)]
b = min([a[n] for n in range(1,6)])
print(math.ceil(a[0]/b)+4)

Submission status: Accepted

Solution code:
import math

a = [int(input()) for i in range(6)]
b = min([a[n] for n in range(1,6)])
print(math.ceil(a[0]/b)+4)

Submission status: Accepted

Solution code:
import sys
import math

n = int(sys.stdin.readline())

mn = 10 ** 16
for i in range(5):
    mn = min(mn, int(sys.stdin.readline()))

print(math.ceil(n/mn)+4)

Submission status: Accepted

Solution code:
import sys
import math

n = int(sys.stdin.readline())

mn = pow(10, 16)
for i in range(5):
    mn = min(mn, int(sys.stdin.readline()))

print(math.ceil(n/mn)+4)

Submission status: Accepted

Solution code:
N = int(raw_input())
lst = []
for i in range(0, 5):
	lst.append(int(raw_input()))
lst.sort()
ans = N / lst[0] + 4
if N % lst[0] != 0: ans += 1
print ans

Submission status: Accepted

Solution code:
import math

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

ans = math.ceil(N/min(moves)) + 4
print(ans)

Submission status: Accepted

Solution code:
from math import ceil as c

a=[]
for i in range(6):
  a.append(int(input()))
n=a[0]
b=0
for i in a[1:]:
  if b<c(n/i):
    b=c(n/i)
print(b+4)

Submission status: Accepted

Solution code:
import time
import math
list=[]
n=int(input())
for a in range(5):
    list.append(int(input()))
min=min(list)
print(math.ceil(n/min)-1+len(list))

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:
  ad = (N//m)-1
else:
  ad = (N//m)
print(ad+5)

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 = int(input())
a = [int(input()) for _ in range(5)]
print(-(-N // min(a)) + 4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

min = x[1]
for i in range(5):
    if min > x[i+1]:
        min = x[i+1]

if x[0]%min == 0:
    print(x[0]//min+4)
else:
    print(x[0]//min+5)

Submission status: Accepted

Solution code:
n = int(input())
res = 0
min_t = n
for i in range(5):
    trans = int(input())
    if trans < min_t:
        min_t = trans
print(4 - (- n) // min_t)

Submission status: Accepted

Solution code:
# coding:utf-8

import sys
# from collections import Counter, defaultdict

INF = float('inf')
MOD = 10 ** 9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return input()


def ceil(n, m):
    return -(-n//m)


def main():
    n = II()
    T = [II() for _ in range(5)]

    return 4 + ceil(n, min(T))


print(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())
miti=[a,b,c,d,e]
print(4+math.ceil(n/min(miti)))

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())
miti=[a,b,c,d,e]
mini=min(miti)
retu=math.ceil(n/mini)
print(4+retu)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
mi = 1e20
for i in range(5):
    mi = min(mi,int(input()))
print(n//mi + (n%mi!=0) + 4)

Submission status: Accepted

Solution code:
n = int(input())
mi = 1e20
for i in range(5):
    mi = min(mi,int(input()))
print(n//mi + (n%mi!=0) + 4)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
N = int(input())
A = [int(input()) for _ in range(5)]
ans = 0
if min(A) >= N:
    ans = 5
    print(ans)
else:
    x = math.ceil(N/min(A))
    ans = x + 4
    print(ans)

Submission status: Accepted

Solution code:
import math
n = int(input())
a = [int(input()) for i in range(5)]
print(math.ceil(n/min(a[0],a[1],a[2],a[3],a[4]))+4)

Submission status: Accepted

Solution code:
N = long(raw_input())
A = long(raw_input())
B = long(raw_input())
C = long(raw_input())
D = long(raw_input())
E = long(raw_input())

list = [A, B, C, D, E]
#print(list)

#slist = sorted(list, reverse=True)
#print(slist)

#list10 = map(lambda x: x % 10, list)
#print(list10)
lminindex = list.index(min(list))
#list.pop(lminindex)
min = list[lminindex]
#print(min)

T1 = -(-N // min) + 4
print(T1)

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

count = math.ceil(n/min(a,b,c,d,e))
print(count+len('ABCDE')-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ds = [int(input()) for _ in range(5)]
def f(x):
  	return (n+x-1)//x
print(4+max(map(f,ds)))

Submission status: Accepted

Solution code:
# -*- coding utf-8 -*-
import itertools
import math

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

ans = 10000000000000000000

bn = max([math.ceil(N/t) for t in times])

print(bn + 4)

Submission status: Accepted

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

int_list = [A, B, C, D, E]
min_int = min(int_list)

if min_int >= N:
    print(5)
else:
    if N%min_int == 0:
        aaa = N // min_int
        print(4+aaa)
    if N%min_int != 0:
        aaa = N // min_int
        print(5+aaa)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math

def solve(N: int, A: int, B: int, C: int, D: int, E: int):
    cost = [A,B,C,D,E]
    cost.sort()
    max = math.ceil(N/cost[0])
    print(max + 4)
    return


# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    C = int(next(tokens))  # type: int
    D = int(next(tokens))  # type: int
    E = int(next(tokens))  # type: int
    solve(N, A, B, C, D, E)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

n = int(input())

time = []

for _ in range(5):
    temp = int(input())
    time.append(temp)
    
if min(time) >= n:
    print(5)
else:
    print(math.ceil(n/min(time)) + 4)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Mon Apr  8 15:45:11 2019

@author: adachi-lab
"""

import math
N = int(input())

T = 0
A = []


for i in range(5):
    X = int(input())
    A.append(X)
    
W1 = A.index(min(A))


T = math.ceil(N/A[W1])+4

print(T)

Submission status: Accepted

Solution code:
N=int(input())
L=[int(input()) for _ in range(5)]
print(5 if min(L)>=N else 4 -((-N)//min(L)))

Submission status: Accepted

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


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

if N % x == 0:
	ans += 0
		
else:
	ans += 1
		
	
print(ans)

Submission status: Accepted

Solution code:
from sys import exit
from math import ceil
# A,B,C = [int(n) for n in input().split()]
N = int(input())
ABCDE = [int(input()) for _ in range(5)]
mostn = min(ABCDE)
print(ceil(N/mostn) + 4)

Submission status: Accepted

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

for i in range(5):
  if i==0:
    a=int(input())
  else:
    b=int(input())
    if b<a:
      a=b
print(math.ceil(N/a)+4)

Submission status: Accepted

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

mini = min(a)
print(N // mini + (5 if N % mini != 0 else 4))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
l = np.array([int(input()) for _ in range(5)])
t = n / l
t = np.ceil(t)
t.sort()
t = t[::-1]

print(int(t[0]+4))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    a = [int(input()) for _ in range(5)]
    if not [i for i in a if i < n]:
        print(5)
        return
    b = n / min(a)
    if int(b) != b:
        b = int(b) + 1
    else:
        b = int(b)
    print(b + 4)


main()

Submission status: Accepted

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

import re

n = int(input())
p = []
min = 1000000000000000

for i in range(5):
    x = int(input())
    p.append(x)
    if(min > x):
        min = x

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

Submission status: Accepted

Solution code:
#abc123c

n=int(raw_input())
m=min([int(raw_input()) for i in xrange(5)])
print (m+n-1)/m+4

Submission status: Accepted

Solution code:
def getInt(): return int(input())
def getIntList(): return [int(x) for x in input().split()]
def zeros(n): return [0]*n
# def zeros(n): return np.zeros(n, dtype=np.longlong)
def zeros2(n, m): return [zeros(m) for i in range(n)] # obsoleted zeros((n, m))で代替

INF = 10**18

class Debug():
    def __init__(self):
        self.debug = True
 
    def off(self):
        self.debug = False
 
    def dmp(self, x, cmt=''):
        if self.debug:
            if cmt != '':
                w = cmt + ': ' + str(x)
            else:
                w = str(x)
            print(w)
        return x

def prob():
    d = Debug()
    d.off()
    N = int(input())
    xport = zeros(5)
    for i in range(5):
        xport[i] = int(input())
    d.dmp((xport),'xport')
    minCapa = INF
    for i in range(5):
        minCapa = min(minCapa, xport[i])
    d.dmp((minCapa),'minCapa')
    minutes = 4
    minutes += (N+minCapa-1)//minCapa
    d.dmp((minutes),'minutes')
    return minutes
    

ans = prob()
print(ans)

Submission status: Accepted

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

x = min(a)

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

Submission status: Accepted

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

if n%x==0:
    y=4+n//x
else:
    y=5+n//x
print(y)