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:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
def main():
    n=I()
    trans=[I(),I(),I(),I(),I()]
    trans.sort()
    print(n//trans[0]+5)
    

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

stage = [capacity[0]]
ans = 0
mn = capacity[0]
for i in range(1,6):
    if capacity[i] < mn:
        ans += (mn//capacity[i]) + 1
        mn = capacity[i]
    else:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''

n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
root = [a, b, c, d, e]
minn=min(root)
#for i in range(5):
#    if root[i]==minn:
#        cnt=i+1
#        break

#print(cnt)
print(5+(n//minn))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,*A=map(int,open(0));print(5+N//min(A))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
n0 = n
a = [0]*5
a[0] = int(input())
a[1] = int(input())
a[2] = int(input())
a[3] = int(input())
a[4] = int(input())
t = [0] * 6
for i in range(5):
    t[i+1] = math.ceil(n/a[i])
    if i == 4:
        break
    if a[i+1] >= a[i]:
        n = n%a[i]
    else:
        if i == 0:
            n = n0
        else:
            n = n0-(t[i+1]-t[i])*a[i+1]
        
    if n == 0:
        n = a[i]
print(sum(t))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
n0 = n
a = [0]*5
a[0] = int(input())
a[1] = int(input())
a[2] = int(input())
a[3] = int(input())
a[4] = int(input())
t = [0] * 6
for i in range(5):
    t[i+1] = math.ceil(n/a[i])
    if i == 4:
        break
    if a[i+1] >= a[i]:
        n = n%a[i]
    else:
        n = n0-(t[i+1]-t[i])*a[i+1]
    #n = max(n%a[i],n-(t[i+1]-t[i])*a[i+1]) 
    if n == 0:
        n = a[i]
print(sum(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())
l=[a,b,c,d,e]
m=min(l)
index=l.index(m)
print((n-1)//m+1+5-(index+1))

Submission status: Wrong Answer

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

l = [None] * 5

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

split = 0 if floor(N/min(l)) <= 1 else floor(N/min(l))
print(5+split)

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [None] * 5

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

split = 0 if int(N/min(l)) <= 1 else int(N/min(l))
print(5+split)

Submission status: Wrong Answer

Solution code:
from math import ceil

N = int(input())

l = [None] * 5

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

print(5 + ceil(N/min(l)))

Submission status: Wrong Answer

Solution code:
N = int(input())

min_l = float("inf")

for i in range(5):
  min_l = min(min_l, int(input()))

print(5+int(N/min_l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import itertools
import math

n = int(input())
p = []
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))
p.append(int(input()))
print(p)

time = math.ceil(n / min(p))

print(4+time)

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
keep=10*100
tempkeep=0
import math
for i in range(0,5):
  a=int(input())
  if n%a==0:
    temp=n//a
  else:
    temp=n//a+1
  if a<keep:
    count+=temp-tempkeep
    tempkeep=temp
    keep=a
  count+=1
print(count-1)

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
keep=10*100
tempkeep=0
import math
for i in range(0,5):
  a=int(input())
  if i==0:
    drop=0
  else:
    drop=1
  if n%a==0:
    temp=n//a
  else:
    temp=n//a+1
  if a<keep:
    count+=temp-tempkeep+drop
    tempkeep=temp
    keep=a
  else:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
keep=10*100
tempkeep=0
import math
for i in range(0,5):
  a=int(input())
  if i==0:
    drop=0
  else:
    drop=1
  if a<keep:
    count+=math.ceil(n/a)-tempkeep+drop
    tempkeep=math.ceil(n/a)
    keep=a
  else:
    count+=1
print(count)

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:
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, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

n=I()
u=[I() for i in range(5)]
ans=n-1+ceil(n/min(u))
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())
num = min(a, b, c, d, e)
cnt = n // num + 1 if n % num == 0 else n // num
print(cnt + 5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
#n, m = list(map(int, input().split()))
# a, b, c = list(map(int, input().split()))
abc = [int(input()) for i in range(5)]
count = 0
start = math.ceil(n/abc[0])-1
_min = abc[0]
for i in range(5):
    if abc[i] < _min:
        count += math.ceil((_min-abc[i])/abc[i])
        _min = abc[i]

print(count+start+5)

Submission status: Wrong Answer

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

costs.sort()
ans = 5
# 一番収容能力が低いところがボトルネックになる
if costs[0] < n:
    if costs[0] % n == 0:
        ans += n // costs[0] - 1
    else:
        ans += n // costs[0]
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

m = [n,0,0,0,0,0]
tot = 0
for j in range(5):
    t = m[j] // l[j]
    s = t * l[j]
    m[j] = m[j] - s
    for i in range(j+1,5):
        s2 = min(l[i-1],l[i]) * max(0,t - 1)
        m[i] = s - s2
        s = s2
    tot += t
    if(m[j] != 0):
        tot += 1
        for i in range(j+1,5)[::-1]:
            m[i] = max(0,m[i] - l[i])
            m[i] += min(m[i-1],l[i-1])
        m[j] = 0


print(tot)

Submission status: Wrong Answer

Solution code:
n = int(input())
people_restriction = [0]*5
for i in range(5):
    people_restriction[i] = int(input())
min_restriction = min(people_restriction)
if n % min_restriction == 0:
    count = n//min_restriction
else:
    count = n//min_restriction + 1
ans = count + 5
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
people_restriction = [0]*5
for i in range(5):
    people_restriction[i] = int(input())
min_restriction = min(people_restriction)
if n % min_restriction == 0:
    count = n//min_restriction
else:
    count = n//min_restriction
ans = count + 5
print(ans)

Submission status: Wrong Answer

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

MIN = min(Z)
if MIN >= N:
    ans = 5
else:
    ans = (N+1)//MIN+4
    if MIN == 1:
        ans -= 1

print(ans)

Submission status: Wrong Answer

Solution code:
from math import floor
temp_list = [int(input()) for _ in range(6)]
n = temp_list.pop(0)
print(5 + floor(n / min(temp_list)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(n//d + 5)

Submission status: Wrong Answer

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

dp = [5,0,0,0,0,0]
ans = 0
while dp[-1]<5:
    for i in range(4,-1,-1):
        if dp[i]>0:
            if dp[i]>=T[i]:
                dp[i] -= T[i]
                dp[i+1] += T[i]
            else:
                dp[i+1] += dp[i]
                dp[i] = 0
    ans +=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    dist = []
    for i in range(5):
        _ = int(_in[i+1])  # type:int
        dist.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    t = [0] * 5
    num = N
    for i in range(5):
        t[i] = math.ceil(num/dist[i])
        if i<4:
            num = num%dist[i]+max((N-num%dist[i])-dist[i+1]*(sum(t)-i-1),0)
    cnt = sum(t)
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)



if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    dist = []
    for i in range(5):
        _ = int(_in[i+1])  # type:int
        dist.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    cnt = math.ceil(N/min(dist))
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import math


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    dist = []
    for i in range(5):
        _ = int(_in[i+1])  # type:int
        dist.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    t = [0] * 5
    num = N
    for i in range(5):
        t[i] = math.ceil(num/dist[i])
        if i<4:
            num = num%dist[i]+max((N-num%dist[i])-dist[i+1]*(sum(t)-i-1),0)
    cnt = sum(t)
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(cnt)

Submission status: Wrong Answer

Solution code:
import math
# import itertools
# import statistics
# import numpy as np
n = int(input())
# n, m = list(map(int, input().split()))
# v = list(map(int, input().split()))
abc = []
for i in range(5):
    abc.append(int(input()))
a_mod = n % abc[0]
count = 0
for i in range(1, 5):
    if a_mod > abc[i]:
        count += math.ceil(a_mod/abc[i])
    if abc[0] > abc[i]:
        count += math.ceil(abc[0]/abc[i]-1)
print(n // abc[0]+5+count)

Submission status: Wrong Answer

Solution code:
import math
# import itertools
# import statistics
# import numpy as np
n = int(input())
# n, m = list(map(int, input().split()))
# v = list(map(int, input().split()))
abc = []
for i in range(5):
    abc.append(int(input()))
a_mod = n % abc[0]
count = 0
for i in range(1, 5):
    if a_mod > abc[i]:
        count += math.ceil(a_mod/abc[i])
if abc[0] != min(abc):
    count += math.ceil(n/min(abc))-math.ceil(n/abc[0])
print(n // abc[0]+5+count)

Submission status: Wrong Answer

Solution code:
P = [int(input()) for _ in range(6)]
N,A,B,C,D,E = P[0],P[1],P[2],P[3],P[4],P[5]
N2,N3,N4,N5,N6 = N//A,N//B,N//C,N//D,N//E
ans = max(N2,N3,N4,N5,N6) + 5
print(ans)

Submission status: Wrong Answer

Solution code:

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

def calc(A):
    if N%A==0:
        return N//A
    else:
        return N//A+1
a=calc(A)
b=1+max(a, calc(B))
c=1+max(b,calc(C))
d=1+max(c, calc(D))
e=1+max(d, calc(E))
print(e)

Submission status: Wrong Answer

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

#nにん
#
a=ceil(N/A)
b=1+max(a, ceil(N/B))
c=1+max(b,ceil(N/C))
d=1+max(c, ceil(N/D))
e=1+max(d, ceil(N/E))
print(e)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
a = list(int(input()) for _ in range(5))
if n > min(a): print(math.ceil(n//min(a)) + 5)
else: print(5)

Submission status: Wrong Answer

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

if n > min(a): print(5+n//min(a))
else: print(5)

Submission status: Wrong Answer

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

max_ = -1
for l in L:
    if n <= l:
        continue
    else:
        temp = (n+1)//l-1
        max_ = max(max_, temp)
if max_ != -1:
    ans += max_
print(ans)

Submission status: Wrong Answer

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

m = min(arr)
midx = arr.index(m)

print(n//m + 5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
cs = []
for i in range(5):
  city = int(input())
  cs.append(city)
m = min(cs)
if m >= n:
  ans = 5
else:
  ans = (n + m - n%m) / m + 4
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
cs = []
for i in range(5):
  city = int(input())
  cs.append(city)
m = min(cs)
if m >= n:
  ans = 5
else:
  ans = (n + n%m) / m + 4
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
cs = []
for i in range(5):
  city = int(input())
  cs.append(city)
m = min(cs)
if m >= n:
  ans = 5
else:
  ans = (n + n%2) /2 + 4
print(int(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
cs = []
for i in range(5):
  city = int(input())
  cs.append(city)
m = min(cs)
if m >= n:
  ans = 5
else:
  ans = (n + n%2) //2 + 4
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
print(N//2 + 5)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N % 2 == 0:
    a = N//2
else:
    a = N//2 + 1
print(a+4)

Submission status: Wrong Answer

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

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

if stop >= n:
    print(5)
    exit()

print(4+(-1*((-1*n)//2)))

Submission status: Wrong Answer

Solution code:
import sys

X = list(map(int, sys.stdin.readlines()))
N = X[0]
min_transport = min(X[1:])

print(5 + (N // min_transport))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(input()) for _ in range(5)]
Min = min(l)
print(n//Min + 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())

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

Submission status: Wrong Answer

Solution code:
import math

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

total = 0
minimum_throughput = number_of_people
for minute in minutes:
    elaplsed_minute = math.floor(number_of_people / minimum_throughput)
    total += elaplsed_minute

    minimum_throughput = min(minute, minimum_throughput)

print(total)

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest

def resolve():
    n = int(input())
    a = [int(input()) for _ in range(5)]

    min_a = min(a)

    print(n // min_a + 5)

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """5
3
2
4
3
5"""
        output = """7"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """10
123
123
123
123
123"""
        output = """5"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """10000000007
2
3
5
7
11"""
        output = """5000000008"""
        self.assertIO(input, output)

if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Wrong Answer

Solution code:
#C
import math
n = int(input())
a=[0]*5
for i in range(5):
    a[i] = int(input())
time = math.ceil(n / a[0])
for i in range(4):
    if a[i] < a[i + 1]:
        a[i + 1] = a[i]
    time += math.ceil(a[i] / a[i + 1])
    # print(time)
print(time)

Submission status: Wrong Answer

Solution code:
#C
import math
n = int(input())
a=[0]*5
for i in range(5):
    a[i] = int(input())
time = math.ceil(n / a[0])
for i in range(4):
    if a[i] < a[i + 1]:
        a[i + 1] = a[i]
    time += math.ceil(a[i] / a[i + 1])
    # print(time)
print(a,time)

Submission status: Wrong Answer

Solution code:
#C
import math
n = int(input())
a=[0]*5
for i in range(5):
    a[i] = int(input())
time = math.ceil(n / a[0])
for i in range(4):
    if a[i] < a[i + 1]:
        a[i + 1] = a[i]
    time += math.ceil(a[i] / a[i + 1])
    print(time)
print(a,time)

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 n%min(a,b,c,d,e) != 0:
    ans = n//min(a,b,c,d,e)+6
else:
    ans = n//min(a,b,c,d,e)+5
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

time = N//F + 5

print(time)

Submission status: Wrong Answer

Solution code:
import numpy as np
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

print(5+int(np.ceil(n/min(a,b,c,d,e))))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from math import ceil

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

A2B = ceil(N / A)
B2C = 1 + max(A2B, ceil(N / B))
C2D = 1 + max(B2C, ceil(N / C))
D2E = 1 + max(C2D, ceil(N / D))
E2G = 1 + max(D2E, ceil(N / E))

print(E2G)

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**15+1
for i in range(5):
    t = int(input())
    if min > t:
        min = t
a = 1
if N - min + 1 > 0:
    a = N + min - 1
print(a//min + 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**15+1
for i in range(5):
    t = int(input())
    if min > t:
        min = t
a = 0
if N - min + 1 > 0:
    a = N + min - 1
print(a//min + 4)

Submission status: Wrong Answer

Solution code:
N = int(input())
min = 10**15+1
for i in range(5):
    t = int(input())
    if min > t:
        min = t
a = 0
if N - min + 1 > 0:
    a = N - min + 1
print(a//min + 5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l=list(int(input()) for _ in range(5))
print(n//min(l)+6)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.read
n,*a, = map(int, input().split( ))
m = min(a)
ans = n//m +5
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
path=[int(input()) for _ in range(5)]
time=0
for i in range(5):
    time=max((N//path[i])+1+i,time+1)
print(time)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(10**15+1)
for _ in range(5):
    b=int(input())
    a=min(a,b)
if a>=n:
    ans=5
else:
    ans=5+(n-a)//a
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=int(10**15+1)
for _ in range(5):
    b=int(input())
    a=min(a,b)
if a>=n:
    ans=5
else:
    ans=5+(n//a)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[0 for _ in range(5)]
for i in range(5):
    a[i]=int(input())
m=min(a)
if m>=n:
    t=5
else:
    t=5+(n-1+m-1)//m

print(t)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [int(input()) for _ in range(5)]
key = min(l)
ans = 5 + n // key + (1 if n // key > 0 else 0) - 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

x = min(l)
print((int(n/x)+1) + 4)

Submission status: Wrong Answer

Solution code:
List = []
for _ in range(6):
  List.append(int(input()))
Count = 5
MIN = min(List[1],List[2],List[3],List[4],List[5],)
Count += List[0]//MIN

print(Count)

Submission status: Wrong Answer

Solution code:
List = []
for _ in range(6):
  List.append(int(input()))
Count = 5
MIN = min(List[0],List[1])
Count += List[0]//List[1]
for i in range (2,6):
  if MIN<=List[i]:
    continue
  else:
    Count += MIN//List[i]
    MIN = List[i]
print(Count)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
mn = float("inf")
for i in range(5):
  ai = int(input())
  if mn > ai:
    mn = ai
print(4+math.ceil(n//mn))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
mn = float("inf")
for i in range(5):
  ai = int(input())
  if mn > ai:
    mn = ai
print(4+math.ceil(mn//n))

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)
print(max(1, (N+1)//X) + 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())
X = min(A, B, C, D, E)
print((N+1)//X + 4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
e=[int(input()) for i in range(5)]
ans=5+math.ceil(n/e[0])-1
for i in range(1,5):
  ans+=math.ceil(min(e[0:i])/e[i]-1)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# from math import factorial,sqrt
# from itertools import permutations as permus
# from fractions import gcd
# from collections import deque,Counter
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix

# strlist = "abcdefghijklmnopqrstuvwxyz"

rows = [int(input()) for _ in range(6)]
n,a,b,c,d,e = rows
minvar = min(rows[1:])

ans = n//minvar + 5

print(ans)
# print(*ans)   # unpackして出力。間にスペースが入る
# for row in board:
#     print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
ninzu = [int(input()) for i in range(5)]
min_ = min(ninzu)
a, b = divmod(N, min_)
print(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())

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

print(5 + N//bottle)

Submission status: Wrong Answer

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

import math
mn = min([a,b,c,d,e])
if mn>=5:
    print(5)
else:
    print(5 + math.ceil(n//mn))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

mn = min([a,b,c,d,e])
if mn >= n:
    print(5)
else:
    print(5 + n//mn)

Submission status: Wrong Answer

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


def main():
    N = int(input())

    P = [0] * 5
    pmin = INF
    n = 0
    for i in range(5):
        P[i] = int(input())
        if P[i] <= pmin:
            pmin = P[i]
            n = i+1
    
    res = 5 + (N // pmin)
    print(res)        


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

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

Submission status: Wrong Answer

Solution code:
import math

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

time = math.ceil(n / base[0])
base_min = base[0]

for i in range(1,5):
  if base_min <= base[i]:
    time = time + 1
  elif base[i] < base_min:
    time = time + math.ceil( (n - base[i]*int(n/base_min) )/base[i]) 
    base_min = base[i]
print(time)

Submission status: Wrong Answer

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

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

print(mini+5)

Submission status: Wrong Answer

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

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

print(mini+4)

Submission status: Wrong Answer

Solution code:
import math

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

print(5+math.floor(n/min(a)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

    print(n//mi + 5)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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(n//b+5)

if __name__ == '__main__':
    main()