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:
i=[int(input()) for _ in range(6)]
m=min(i[1:])
print(i[0]//m+5)

Submission status: Wrong Answer

Solution code:
N = int(input())
trans = []
for i in range(5):
  trans.append(int(input()))
count = 5#最短時間
min_yusou = min(trans)
if N % min_yusou == 0:
  tmp = N // min_yusou - 1
else:
  tmp = N // min_yusou
max_tmp = tmp
count += tmp
for i in range(1,4):
  if trans[i] % trans[i+1] == 0:
    tmp = trans[i] // trans[i+1] - 1
  else:
    tmp = trans[i] // trans[i+1]
  if tmp > max_tmp:
    count += (tmp - max_tmp)
    max_tmp = tmp
print(count)

Submission status: Wrong Answer

Solution code:
n, *nums = [int(input()) for _ in range(6)]

neck = min(nums)

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

Submission status: Wrong Answer

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

import math

transport = [a, b, c, d, e]
time = 0
n_people = n
for i in range(5):
    if i >= 1:
        if transport[i - 1] > transport[i]:
            n_people  = left + transport[i - 1] % transport[i]
        else:
            n_people = left
    time += n_people // transport[i] + 1
    left = n_people  % transport[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())

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

x=min(A,B,C,D,E)
if x<N:
    if N%x==0:
        print(N//x+4)
    else:
        print(N//x+5)
else:
    print(6)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

time = 0
n = N

for i in range(5):
  time += max(math.ceil(n / abcde[i]), 1)
  if i < 4:
    n = abcde[i] + max(N - time * abcde[i+1], 0)

print(time)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if min(nums) >= N:
  print(5)
else:
  print(5+N//min(nums))

Submission status: Wrong Answer

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

mt = min(t)
print(int(N / min(t)) + 5)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from string import ascii_uppercase
import sys, bisect
stdin = sys.stdin
read_int = lambda : list(map(int,stdin.readline().split()))
read_str = lambda : stdin.readline().rstrip()

N = read_int()[0]
cap = [read_int()[0] for _ in range(5)]

def solve():
    b_neck = cap[0]
    b_ni = 0
    for i in range(5):
        if b_neck > cap[i]:
            b_neck = cap[i]
            b_ni = i
    till_neck = b_ni
    in_neck = N // b_neck
    to_last = 5 - b_ni if b_ni != 4 else 0
    ans = till_neck + in_neck + to_last
    return ans

if __name__ == "__main__":
    print(solve())

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc123/tasks/abc123_c

import itertools
import collections
import bisect
import math

def main():
    N = int(input())
    last = N
    q = []
    for i in range(5):
        s = int(input())
        v = min(last, s)
        q.append(v)
        last = v

    f_step = math.ceil(N / q[0])
    ans = f_step
    # print(q)
    # print("ans = {}".format(ans))
    for i in range(1, 5):
        if q[i] < q[i-1]:
            # print("math.ceil(q[i] / q[i-1]) = {}".format(math.ceil(float(q[i]) / float(q[i-1]))))
            ans += math.ceil(N / q[i]) - 1
        else:
            ans += 1
        # print("ans = {}".format(ans))

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
A=[int(input()) for i in range(5)]
m=min(A)
print(math.floor(N/m)+5)

Submission status: Wrong Answer

Solution code:
import math

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

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

s = (math.floor(N / m) if N != m else 0) + 5
print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
num = [int(input()) for _ in range(5)]
ans = 5
minnum = min(num)
if N> minnum :
    if N%minnum==0:
        ans = ans + N/minnum - 1
    else:
        ans = ans + N//minnum
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n=int(input())
d=[0 for i in range(5)]
for i in range(5):
    d[i]=int(input())
j=0
mn=999999999999
for i in range(5):
    if mn>d[i]:
        j=i
        mn=d[i]
print(5+max((n-mn+1),0)//mn)

Submission status: Wrong Answer

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


def solv(n, a, b, c, d, e):
    limited = min(a, b, c, d, e)
    ans = 4 + (n + (limited)) // limited
    return ans


if __name__ == '__main__':

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

    ans = solv(n, a, b, c, d, e)

    print(ans)

Submission status: Wrong Answer

Solution code:
import bisect
from collections import deque
from collections import defaultdict
from fractions import gcd
#from math import factorial
from math import sqrt
from math import ceil
from itertools import permutations
N=int(input())
A=[]
B=[]
mi=10**10
T=False
for i in range(5):
    a=float(input())
    mi=min(a,mi)
    A.append(a)
B.append(ceil(N/A[0]))
if A[0]==mi:
    T=True
for i in range(4):
    if T:
        B.append(B[i]+1)
        continue
    if A[i+1]<A[i]:
        B.append(B[i]-ceil(N/A[i])+ceil(N/A[i+1])+1)
        if A[i+1]==mi:
            T=True
    else:
        B.append(B[i]+1)
print(B[-1])

Submission status: Wrong Answer

Solution code:

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

print(5 + N//(min(A,B,C,D,E)+1))

Submission status: Wrong Answer

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

min_num=min(nums)

print(N//min_num+5)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

time = 0
n = N

for i in range(5):
  time += max(math.ceil(n / abcde[i]), 1)
  if i < 4:
    n = abcde[i] + (N - time * abcde[i+1])

print(time)

Submission status: Wrong Answer

Solution code:
import sys

N = int(raw_input().split()[0])
M = []
for i in range(5):
    l = int(raw_input().split()[0])
    M.append(l)
# print(M, N)
a = min(M)
# print(a)
b = (N + a - 1) / a
print(b + 5)

Submission status: Wrong Answer

Solution code:
a=[]
N = int(input())
index = -1
Min = 10**20
min_index = -1
for i in range(5):
    buf = int(input())
    a.append(buf)
    if buf >= N and index == -1:
        index = i
    if buf < Min:
        Min = buf
        min_index = i

if index != -1 and index < min_index:
    print(N//min(a)+4)
else:
    print(N//min(a)+5)

Submission status: Wrong Answer

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

paths = [a, b, c, d, e]
min_path = min(paths)
time = n // min_path + 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())

# status=np.array([n,0,0,0,0,0])
# end=np.array([0,0,0,0,0,n])
# t=0

# while (status==end).all()==False:
#     A=min(a,status[0])
#     B=min(b,status[1])
#     C=min(c,status[2])
#     D=min(d,status[3])
#     E=min(e,status[4])
#     status=status-np.array([A,B-A,C-B,D-C,E-D,-E])
#     t+=1
#     # print(status)

# print(t)

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


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

def count(n, m):
    return int(n / m + 1)

def max(c, t):
    if c < t:
        return t
    else:
        return c

m = 0
m = max(m, count(N, A))
m = max(m, count(N, B))
m = max(m, count(N, C))
m = max(m, count(N, D))
m = max(m, count(N, E))

print(4 + m)

Submission status: Wrong Answer

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

wait = max([int((n+0.001)/w) for w in [a,b,c,d,e]])
print(5 + wait)

Submission status: Wrong Answer

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

persons = [N, 0, 0, 0, 0, 0]
min_trans = min(trans)
print(int(N/min_trans) + 1 + 4)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
for i in range(5):
  l.append([int(input()),i])
l = sorted(l, key=lambda x: x[0])
x=l[0][1]
y=l[0][0]
print(int(n/y)+x+5-x)

Submission status: Wrong Answer

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

time = []
time.append(int(N/capacity_list[0])+1)
for i in range(0,4):
    if capacity_list[i]>capacity_list[i+1]:
        time.append(int((capacity_list[i]-capacity_list[i+1])*time[i]/capacity_list[i+1])+1)
    else:
        time.append(1)
print(sum(time))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
a = [0 for i in range(5)]
n = int(input())
for i in range(5):
    a[i] = int(input())
if n % a[0] == 0:
    time = n // a[0]
else:
    time = n // a[0] + 1
for i in range(4):
    if a[i] > a[i+1]:
        if n % a[i] == 0:
            time1 = n // a[i]
        else:
            time1 = n // a[i] + 1
        if n % a[i+1] == 0:
            time2 = n // a[i+1]
        else:
            time2 = n // a[i+1] + 1
        time += (time2 - time1)
    time += 1
print(time)

Submission status: Wrong Answer

Solution code:
import math

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

a = math.ceil(N/A)
b = math.ceil(N/B)
c = math.ceil(N/C)
d = math.ceil(N/D)
e = math.ceil(N/E)

s = [a,b,c,d,e]

ans = sum(s)


print(ans - abs(a-b) - abs(b-c) - abs(c-d) - abs(d-e))

Submission status: Wrong Answer

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

delay = N//min_capa

print(5 + delay)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
time = [a,b,c,d,e]


ans = n // min(time) + 5

print(ans)

Submission status: Wrong Answer

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

for i in range(5):
    a = int(input())
    li.append(a)

kaisuu = 0

for i in range(5):
    if i == 0:
        if N % li[i] == 0:
            kaisuu = N // li[i]
        else:
            kaisuu = N // li[i] + 1
    else:
        # もし前の部分全部見て自分より小さい数があれば + 1
        flg = 0
        minsuu = float("inf")
        for j in range(i):
            if li[j] <= li[i]:
                flg = 1
                break

            if minsuu > li[j]:
                minsuu = li[j]

        if flg == 1:
            kaisuu += 1
        else:
            if minsuu % li[i] == 0:
                kaisuu += minsuu // li[i]
            else:
                kaisuu += minsuu // li[i]+1


print(kaisuu)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc123/tasks/abc123_c

import itertools
import collections
import bisect
import math

def main():
    N = int(input())
    last = N
    q = []
    for i in range(5):
        s = int(input())
        v = min(last, s)
        q.append(v)
        last = v

    f_step = math.ceil(N / q[0])
    ans = f_step
    # print(q)
    # print("ans = {}".format(ans))
    for i in range(1, 5):
        if q[i] < q[i-1]:
            # print("math.ceil(q[i] / q[i-1]) = {}".format(math.ceil(float(q[i]) / float(q[i-1]))))
            ans += math.ceil(N / q[i])
        else:
            ans += 1
        # print("ans = {}".format(ans))

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

ans=0
ans+=math.ceil(n/a[0])
for i in range(1,5):
  if math.ceil(n/a[i])-math.ceil(n/a[i-1]) <= 0:
    ans+=1
  else:
    ans+=math.ceil(n/a[i])-math.ceil(n/a[i-1])+1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
move_list = [int(input()) for _ in range(5)]
time = 0
time += math.ceil(n/move_list[0])
if move_list[0] >= move_list[1]:
    time = 1 + (n/move_list[1])
else:
    time = 1 + time
if move_list[1] >= move_list[2]:
    time = 1 + (n/move_list[2])
else:
    time = 1 + time
if move_list[2] >= move_list[3]:
    time = 1 + (n/move_list[3])
else:
    time = 1 + time
if move_list[3] >= move_list[4]:
    time = 1 + (n/move_list[3])
else:
    time = 1 + time
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()) #整数

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

Submission status: Wrong Answer

Solution code:
read = input
n = int(read())
a = [read() for i in range(5)]
a = list(map(int, a))
a = min(a)
if n % a == 0:
    n = n / a
else :
    n = n // a + 1
print( n + 5 - 1 )

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

N = int(raw_input().split()[0])
M = []
for i in range(5):
    l = int(raw_input().split()[0])
    M.append(l)
# print(M, N)
a = min(M)
# print(a)
b = (N + 1 - 1) / a
print(b + 5)

Submission status: Wrong Answer

Solution code:
N, A, B, C, D, E = int(input()), int(input()), int(input()), int(input()), int(
    input()), int(input())
ABC = [A, B, C, D, E]
ans = 0
push = N
for i in range(5):
    if push <= ABC[i]:
        ans += 1
    else:
        ans += push // ABC[i] + 1
        push = ABC[i]
print(ans)

Submission status: Wrong Answer

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

if n == 0:
    res = 0
else:
    res = int(n/min(l)) + 5

print(res)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    M = []
    for _ in range(5):
        M.append(int(input()))
    x = min(M)
    if x > N:
        print(5)
    else:
        print(N // x + 5)


main()

Submission status: Wrong Answer

Solution code:

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
num=[]
 
for i in range(5):
    num.append(int(input()))
 
num_s=sorted(num)
if N%num_s[0]==0:
    print(N/num_s[0]+4)
else:
    print(int(N/num_s[0]+0.5)+5)

Submission status: Wrong Answer

Solution code:
#import math

N = int(input())
# A = int(input())
# B = int(input())
# C = int(input())
# D = int(input())
# E = int(input())
M = []
for i in range(5):
    M.append(int(input()))

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

Submission status: Wrong Answer

Solution code:
a=[]
N = int(input())
index = -1
Min = 10**20
min_index = -1
for i in range(5):
    buf = int(input())
    a.append(buf)
    if buf >= N:
        index = i
    if buf < Min:
        Min = buf
        min_index = i

if index != -1 and index < min_index:
    print(N//min(a)+4)
else:
    print(N//min(a)+5)

Submission status: Wrong Answer

Solution code:
n, *nums = [int(input()) for _ in range(6)]

neck = min(nums)

if neck >= n:
    print(5)
else:
    print(n // neck + 5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# encoding:utf-8
import copy
import numpy as np
import random
import bisect #bisect_left　これで二部探索の大小検索が行える

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

traffic_time.sort()

wait_time = n//traffic_time[0]
if wait_time == 1:
    wait_time = 0
print(wait_time+5)

Submission status: Wrong Answer

Solution code:
import sys
import math

def main():

    lst = []

    for line in sys.stdin:
        line = line.rstrip()
        a = int(line)
        lst.append(a)

    n = lst[0]
    a_to_e = lst[1:]

    # ボトルネック基準でやる
    bottle = min(a_to_e)

    print(5 + math.floor(n / bottle))
    return 0

if __name__ == '__main__':
    sys.exit(main())

Submission status: Wrong Answer

Solution code:
a = [int(input()) for _ in range(6)]
ans = 5
x = min(a[0], a[1])
if a[0] > a[1]:
    ans += a[0] // a[1]

for i in a[2:]:
    if x > i:
        ans += x // i
        x = i
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(5 + N//min(A,B,C,D,E))

Submission status: Wrong Answer

Solution code:
#coding: utf-8
N = int(input())
l = []
pre = 0
ans = 0
for i in range(5):
    l.append(int(input()))
for i in range(5):
    tmp = N // l[i] + N % l[i] if N > l[i] != 0 else 1
    ans += tmp - pre if tmp > pre else 1
    pre = tmp
print(ans)

Submission status: Wrong Answer

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

res = int(n/min(l)) + 5
    
print(res)

Submission status: Wrong Answer

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

import math
sList = sorted(List, reverse=True)
if sList[4]>=N:
  print(5)
else:
  print(round(N//sList[4])+5)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

limit = min(limits)

min_time = 5
min_time += n // limit

print(min_time)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())

A=[]
iA=[]

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

for i in range(5):
    iA.append(math.ceil(N/A[i]))

t=iA[0]

for i in range(4):
    if iA[i]<iA[i+1]:
        t+=max(iA[i+1]-iA[i]+1,math.ceil(A[i]/A[i+1]))
    else:
        t+=1

print(t)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
time = [a, b, c, d, e]
#print(min(time))
if N/min(time)==1:
  print(int(N/min(time))+4)
else:
  print(int(N/min(time))+5)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import math

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

time = 0
n = N

for i in range(5):
  time += max(math.ceil(n / abcde[i]), 1)
  if i < 4:
    n = max(N - abcde[i+1] * (time-1), 0)

print(time)

Submission status: Wrong Answer

Solution code:
N = int(input())
li = list()

for _ in range(5):
  li.append(int(input()))
ans = N
aa = 0
for i in range(5):
  ak= ans // li[i]
  aa += 1 + ak
  if ak != 0:
    ans = li[i]
print(aa)

Submission status: Wrong Answer

Solution code:
n,*a=map(int,open(0).read().split())
b=min(a)
if b==1:
    print(9)
elif b<n:
    print(n//b+(n%b>0)-1+5)
else:
    print(5)

Submission status: Wrong Answer

Solution code:
def main():
	n = int(input())
	r = [0]*5
	r[0] = int(input())
	r[1] = int(input())
	r[2] = int(input())
	r[3] = int(input())
	r[4] = int(input())
	total = 4
	min_r = min(r)
	print(min_r)
	div = n // min_r
	mod = n % min_r
	total += div
	if mod != 0:
		total += 1

	print(total)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []
su = 0
d = 0
for i in range(5):
    k = int(input())
    a.append([k,-(-1*n//k)])

for i in range(5):
    if i == 0:
        su += a[i][1]
    else:
        if a[i-1][1] < a[i][1]:
            if d < a[i][1] - a[i-1][1]:
                su += a[i][1] - a[i-1][1] + 1
                d = a[i][1] - a[i-1][1]

        else:
            su += 1
print(su)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(N // min(l) + len(l))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding: utf-8
n=int(input())
d=[0 for i in range(5)]
for i in range(5):
    d[i]=int(input())
j=0
mn=999999999999
for i in range(5):
    if mn>d[i]:
        j=i
        mn=d[i]
print(j+int((n+mn-1)/mn)+(4-j))

Submission status: Wrong Answer

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

li = [(A, 0), (B, 1), (C, 2), (D, 3), (E, 4)]
bottleneck = min(li, key=lambda x: x[0])
t = 0
t += bottleneck[1]
b = bottleneck[0]
if N % b == 0:
    t += N / b
else:
    t += N // b + 1
t += 4 - bottleneck[1]
print(t)

Submission status: Wrong Answer

Solution code:
N = int(input())
min_time = 1000000000000000
for i in range(5):
    a = int(input())
    if min_time > a:
        min_time = a

print(N // min_time + 5)

Submission status: Wrong Answer

Solution code:
from math import ceil
N = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
li = [a, b, c, d, e]
#exist = [N, 0, 0, 0, 0, 0]
cnt = []
for i in range(5):
    cnt.append(ceil(N / li[i]))
ans = cnt[0]
an = [cnt[0]]
for i in range(1, 5):
    mini = min([cnt[i]-(cnt[i-j]-j) for j in range(1, i+1)])
    ans += max(1, mini)
    #an.append(max(1, cnt[i] - (cnt[i - 1] - 1)))
    #ans += max(1, cnt[i] - (cnt[i - 1] - 1))
# print(cnt)
# print(an)
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict as ddic
from collections import deque
from itertools import combinations, permutations, product
import bisect
import heapq
import math
import sys

stdout = sys.stdout
rr = lambda: input().strip()
rri = lambda: int(rr())
rrm = lambda: list(map(int, rr().split()))


n = rri()
a = rri()
b = rri()
c = rri()
d = rri()
e = rri()

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

plus = n // tiny if tiny != n else 0
print(5 + plus)

Submission status: Wrong Answer

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

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

    # 最低これだけは利用しないといけない
    A_count = N // A + 1
    B_count = N // B + 1
    C_count = N // C + 1
    D_count = N // D + 1
    E_count = N // E + 1

    # 利用順序は関係ないので, 最大のところがボトルネックとなる
    max_count = max([A_count, B_count, C_count, D_count, E_count])

    # これにこれを最後に置くとして, 4回だけ増やす
    print(max_count + 4)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
n,a,b,c,d,e=[int(input()) for _ in range(6)]
ans=0
ans+=math.ceil(n/a)
ans+=math.ceil(a/b)
ans+=math.ceil((a/b)/c)
ans+=math.ceil(((a/b)/c)/d)
ans+=math.ceil((((a/b)/c)/d)/e)
print(ans)

Submission status: Wrong Answer

Solution code:
#C
import math
N = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
num = [a,b,c,d,e]
neck = min(num)
t = 5 + N//neck
print(int(t))

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

list_ = np.array([a, b, c, d, e])

list_min = list_.min()

if n % list_min == 0:
  min_ = n / list_min
else:
  min_ = n // list_min + 1
print(min_ + 4)

Submission status: Wrong Answer

Solution code:
n=int(input())
an=[int(input()) for _ in range(5)]
m = min(an)
print(n//min(an)+5 if m < n else 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())
aa=[]
aa.append(a)
aa.append(b)
aa.append(c)
aa.append(d)
aa.append(e)

coun = [0 for i in range(6)]

coun[0] = n
time = 0
people = n
for i in range(5):
    if(people % aa[i] == 0):
        time += (people // aa[i])
    else:
        time += ((people // aa[i])+1)
    peo = people-people%aa[i]
    people = people%aa[i]
    if(i != 4):
        if(peo - (time-1)*aa[i+1]>0):
            people += (peo - (time-1)*aa[i+1])


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

ans = min((a,b,c,d,e)) + 4
print(ans)

Submission status: Wrong Answer

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

hun=[]
hun.append(a)
hun.append(b)
hun.append(c)
hun.append(d)
hun.append(e)

hun.sort()

risso=hun[0]
if n<=risso:
  print(5)
else:
  print(5+((n+1)//risso)-1)

Submission status: Wrong Answer

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

li = [(A, 0), (B, 1), (C, 2), (D, 3), (E, 4)]
bottleneck = min(li, key=lambda x: x[0])
t = 0
t += bottleneck[1]
b = bottleneck[0]
if N % b == 0:
    t += N / b
else:
    t += N // 2 + 1
t += 4 - bottleneck[1]
print(t)

Submission status: Wrong Answer

Solution code:
N = int(input())
abcde = [int(input()) for i in range(5)]
x = min(abcde)
y = int(N / x)
print(5+y)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc123/tasks/abc123_c

import itertools
import collections
import bisect
import math

def main():
    N = int(input())
    last = N
    q = []
    for i in range(5):
        s = int(input())
        v = min(last, s)
        q.append(v)
        last = v

    f_step = math.ceil(N / q[0])
    ans = f_step
    # print(q)
    # print("ans = {}".format(ans))
    for i in range(1, 5):
        if q[i] < q[i-1]:
            # print("math.ceil(q[i] / q[i-1]) = {}".format(math.ceil(float(q[i]) / float(q[i-1]))))
            ans += math.ceil(q[i-1] / q[i])
        else:
            ans += 1
        # print("ans = {}".format(ans))

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

tmplist = [A,B,C,D,E]
max_time_list = []
for x in tmplist:
    max_time_list.append(int(N/x)+1)

print(max(max_time_list)+4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

s = math.floor(N / m) + 5
print(s)

Submission status: Wrong Answer

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

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

print(N//rissoku+5)

Submission status: Wrong Answer

Solution code:
N=int(input())
num = [int(input()) for _ in range(5)]
ans = 5
if N>min(num):
    ans = ans + (N+1)//min(num) - 1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
A=[int(input()) for i in range(5)]
m=min(A)
print(round((N-(N%m))/m+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())
time = [a, b, c, d, e]
#print(min(time))
print(int(N/min(time))+5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 2019/04/06
# AtCoder Beginner Contest 123 - C

# Input
n = int(input())
tl = list()
minval = 10 ** 16

for i in range(5):
    tl.append(int(input()))
    if tl[i] < minval:
        minval = tl[i]

ans = int(n / minval) + 1 + 4

# Output
print(ans)