TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
def apply(a,b):
  if a>b:
	return a, a-1, b
  else:
    return b, a, b-1

if __name__ == '__main__':
  a,b = map(int,input().split())
  res = 0
  tmp, a, b = apply(a,b)
  res += tmp
  tmp, a, b = apply(a,b)
  res += tmp
  print(res)

def apply(a,b):
  if a>b:
    return (a, a-1, b)
  else:
    return (b, a, b-1)

if __name__ == '__main__':
  a,b = map(int,input().split())
  res = 0
  tmp, a, b = apply(a,b)
  res += tmp
  tmp, a, b = apply(a,b)
  res += tmp
  print(res)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0])
else:
  print(x[0]+x[1])

x=list(map(int,input().split()))
x.sort()
if x[0]-x[1]>=2:
  print(2*x[0])
else:
  print(x[0]+x[1])

x=list(map(int,input().split()))
x.sort(reverse=True)
if x[0]-x[1]>=2:
  print(2*x[0]-1)
else:
  print(x[0]+x[1])

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = map(int(input()))

l = [2*a-1, a+b, 2b-1]

print(max(l))

a, b = map(int,input().split())

l = [2*a-1, a+b, 2*b-1]

print(max(l))

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a, b = map(int, input().split())
if a >= b + 1:
  print(a + a -1)
elif a = b:
  print(a + b)
else:
  print(b + b - 1)

a, b = map(int, input().split())
if a > b :
  print('a + a -1')
elif a == b:
  print('a + b')
else:
  print('b + b - 1')


a, b = map(int, input().split())
if a > b :
  print('a + a -1')
elif a = b:
  print('a + b')
else:
  print('b + b - 1')


a,b = map(int, input().split())
if a > b:
  print(2a - 1)
elif a == b:
  print(2a)
else:
  print(2b -1)

a,b = map(int, input().split())
if a > b:
  print(2*a - 1)
elif a == b:
  print(2*a)
else:
  print(2*b -1)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = input().split()
# print(a)
# print(b)

if a > b:
    print(a + a - 1)
elif a < b:
    print(b + b - 1)
else:
    print(a + a)

A, B = map(int, input().split())
if A > B:
    print(A + A - 1)
elif B > A:
    print(B + B - 1)
else:
    print(A + A)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
N, K = map(int, input().split())
S = input()
a = []
if S[0] == '0':
    a.append(0)
cnt = 1
for i in range(1, N):
    if S[i] != S[i - 1]:
        a.append(cnt)
        cnt = 1
    else:
        cnt += 1

a.append(cnt)
a.append(0)
a.append(0)

ans = s = sum(a[:2*K + 1])
for i in range(2*K + 2, len(a), 2):
    s += a[i] + a[i - 1] - a[i - 2*K - 1] - a[i - 2*K - 2]
    ans = max(ans, s)
print(ans)


N, K = map(int, input().split())
S = list(map(int, input()))

Z = [j for j, s in enumerate(S) if (j > 0 and s == 0 and S[j] != S[j-1]) or (j == 0 and s == 0)] + [N]
Y = [j for j, s in enumerate(S) if (j > 0 and s == 1 and S[j] != S[j-1]) or (j == 0 and s == 1)]
result = 0
if len(Z) <= K:
  print(N)
else:
    for i in range(len(Z)-K):
      if i == 0:
        result = Z[i+K]
      else:
        result = max(result, Z[i+K] - Y[i if Y[0] < Z[0] else i-1])
    print(result)

N, K = map(int, input().split())
S = list(map(int, input()))

Z = [j for j, s in enumerate(S) if (j > 0 and s == 0 and S[j] != S[j-1]) or (j == 0 and s == 0)] + [N]
Y = [j for j, s in enumerate(S) if (j > 0 and s == 1 and S[j] != S[j-1]) or (j == 0 and s == 1)]
result = 0
if len(Z) <= K:
  print(N)
else:
  for i in range(len(Z)-K):
    if i == 0:
      result = Z[i+K]
    else:
      result = max(result, Z[i+K] - Y[i if Y[0] < Z[0] else i-1])
    print(result)

input_ = list(map(int,input().split()))
x = input_[0]
y = input_[1]
point = max(x,y)
if point == x:
  x -= 1
else:
    y -= 1
point += max(x,y)
print(point)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
line = raw_input()
lines = line.split()
a = int(lines[0])
b = int(lines[1])
res = 0
if a > b:
  res = a + a - 1
elif b > a:
  res = b + b - 1
else:
  res = a + b

print(res)

line = raw_input()
lines = line.split()
a = int(lines[0])
b = int(lines[1])
res = 0
if a > b:
  res = a + a - 1
elif b > a:
  res = b + b - 1
else:
  res = a + b

print(res)

line = input()
lines = line.split()
a = int(lines[0])
b = int(lines[1])
res = 0
if a > b:
  res = a + a - 1
elif b > a:
  res = b + b - 1
else:
  res = a + b

print(res)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
#coding:UTF-8


buttons = list(map(int, input().split()))


max_coin = 0

for _ in range(2):
  if buttons[0] > buttons[1]:
    max_coin += buttons[0]
    button[0] -= 1
  else:
    max_coin += button[1]
    buttons[1] -= 1
    

print(max_coin)

# coding:UTF-8


buttons = list(map(int, input().split()))


max_coin = 0

for _ in range(2):
    if buttons[0] > buttons[1]:
        max_coin += buttons[0]
        buttons[0] -= 1
    else:
        max_coin += buttons[1]
        buttons[1] -= 1


print(max_coin)

Verdicts: Runtime Error

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
i = [2,2]

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)


i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0] + i[0] - 1
else:
    max = max([i[0], i[1]])
    num = max + max-1


i = list(map(int, input().split()))

if i[0] == i[1]:
    num = i[0]*2
else:
    max = max([i[0], i[1]])
    num = max + max-1

print(num)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=[int(i) for i in input().split()]

print(min[2*a-1,a+b,2*b-1])

a,b=[int(i) for i in input().split()]
print(min([2*a-1,a+b,2*b-1])

a,b=[int(i) for i in input().split()]
print(min([2*a-1,a+b,2*b-1]))

a,b=[int(i) for i in input().split()]
print(max([2*a-1,a+b,2*b-1]))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b=map(int,input().split())
print(max(a*(a-1),a*b,b*(b-1)))

a,b=map(int,input().split())
print(max(a+(a-1),a+b,b+(b-1)))

Verdicts: Wrong Answer

Accepted
Problem: There are two buttons, one of size A and one of size B.  When you press a button of size X, you get X coins and the size of that button decreases by 1.  You will press a button twice. Here, you can press the same button twice, or press both buttons once.  At most how many coins can you get?

Submission attempts (in order):
a,b = map(int,input().split())
coin = 0
    if a>b:
        coin = 2a-1
    elif a ==b:
        coin = 2a
    elif b>a:
        coin =2b-1
print(coin)

a,b = map(int,input().split())
coin = 0
if a>b:
    coin = 2*a-1
elif a ==b:
    coin = 2*a
elif b>a:
    coin =2*b-1
print(coin)

Verdicts: Runtime Error

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

Submission attempts (in order):
N = int(input())
t = [int(input()) for _ in range(5)]
min_t = min(t)
index = t.index(min_t)
num = N // min_t
if N % min_t != 0:
    num += 1
print(num + 4-index)

N = int(input())
t = [int(input()) for _ in range(5)]
min_t = min(t)
index = t.index(min_t)
num = N // min_t
if N % min_t != 0:
    num += 1
print(num + 4)

Verdicts: Wrong Answer

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

Submission attempts (in order):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

time = 0
if N%A !=0:
    time += N//A +1
    N= N%A
else:
    time += N//A
    N= A

if N%B !=0:
    time += N//B +1
    N= N%B
else:
    time += N//B
    N= B

if N%C !=0:
    time += N//C +1
    N= N%C
else:
    time += N//C
    N= C

if N%D !=0:
    time += N//D +1
    N= N%D
else:
    time += N//D
    N= D

if N%E !=0:
    time += N//E +1
    N= N%E
else:
    time += N//E
    N= E

print(time)

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

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
n=int(input())
d=[int(input()) for i in range(5)]
time=0
x=n
for i in range(4):
  if x%d[i]:
    time+=x//d[i]+1
  elif x==0:
    time+=1
  else:
    time+=x//d[i]
  x-=time*d[i+1]
  if x<=0:
    x=0
    
if x%d[-1]:
  time+=x//d[-1]+1
elif x==0:
  time+=1
else:
  time+=x//d[-1]
print(time)

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

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
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)


import math

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

minimum_throughput = min(minutes)
total_elapsed_minute = 4 + math.ceil(number_of_people / minimum_throughput)

print(total_elapsed_minute)


Verdicts: Wrong Answer

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

Submission attempts (in order):
import math

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

import math

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
#coding:utf-8

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

n = [N,0,0,0,0,0]
time=0
def trans(i):
    if n[i] != 0:
        if m[i] > n[i]:
            n[i+1] = n[i]
            n[i] = 0
        else:
            n[i] -= m[i]
            n[i+1] = m[i]

while n[5] != N:
    for i in range(5):
        trans(i)
    time+=1

print(time)

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

min_move = min(move)

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

print(int(ans))

Verdicts: Wrong Answer

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

Submission attempts (in order):
import heapq
X,Y,Z,K = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
asort,bsort,csort = sorted(A,reverse=True),sorted(B,reverse=True),sorted(C,reverse=True)
already = set((0,0,0))
print(asort[0] + bsort[0] + csort[0])
x,y,z = 0,0,0
check = []
for k in range(K - 1):
    if (x + 1,y,z) not in already and x + 1 < X:
        already.add((x + 1,y,z))
        heapq.heappush(check,(-(asort[x + 1] + bsort[y] + csort[z]),x + 1,y,z))
    if (x,y + 1,z) not in already and y + 1 < Y:
        already.add((x,y + 1,z))
        heapq.heappush(check,(-(asort[x] + bsort[y + 1] + csort[z]),x,y + 1,z))
    if (x,y,z + 1) not in already and z + 1 < Z:
        already.add((x,y,z + 1))
        heapq.heappush(check,(-(asort[x] + bsort[y] + csort[z + 1]),x,y,z + 1))
    maxsum = heapq.heappop(check)
    print(-maxsum[0])
    x,y,z = maxsum[1],maxsum[2],maxsum[3]

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

Verdicts: Runtime Error

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

Submission attempts (in order):
n=int(input())
l=list(int(input()) for _ in range(5))
print(n//min(l)+6)

n=int(input())
l=list(int(input()) for _ in range(5))
print(-(-n//min(l))+4)

Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
l = (int(input()) for i in range(5))
l2 = []
for i in range(5):
    if n % l[i] == 0:
        l2.append(n // l[i])
    else:
        l2.append(n // l[i] + 1)
l2.sort(reverse = True)
print(l2[0] + 4)

n = int(input())
l = [int(input()) for i in range(5)]
l2 = []
for i in range(5):
    if n % l[i] == 0:
        l2.append(n // l[i])
    else:
        l2.append(n // l[i] + 1)
l2.sort(reverse = True)
print(l2[0] + 4)

Verdicts: Runtime Error

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

Submission attempts (in order):
n = import math
n = int(input())

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

min_num = min(A)

ans = math.ceil(n/min_num)+4


print(ans)

import math
n = int(input())

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

min_num = min(A)

ans = math.ceil(n/min_num)+4


print(ans)

Verdicts: Runtime Error

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

Submission attempts (in order):
import math

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

print(n)

# array = [a, b, c, d, e]

i = 5
if n <= a:
    if a <= b:
        if b <= c:
            if c <= d:
                if d <= e:
                    pass
                else:
                    i += math.ceil(d/e) -1
            else:
                i += math.ceil(c/d) -1
        else:
            i += math.ceil(b/c) -1 
    else:
        i += math.ceil(a/b) - 1
else:
    i += math.ceil(n/a) - 1
    print(math.ceil(n/a))

print(i)


# import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

print(min, ans)


# import math
n = int(input())
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())

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

print(ans)


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math
a=list(int(input()) for _ in range(6))
ans=0
for i in range(1,6):
    if a[i-1]<=a[i]:
        ans+=1
    else:
        ans+=math.ceil(a[i-1]/a[i])
print(ans)


import math
a=list(int(input()) for _ in range(6))
ans=0
for i in range(1,6):
    if a[i-1]<=a[i]:
        ans+=1
    else:
        ans+=math.ceil(a[i-1]/a[i])
    print(ans)
print(ans)


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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
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))

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
n = int(input())
a= [int(input()) for _ in range(5)]
count = 5
count2 = n
for i in range(0,5):
    b = -(-count2 // a[i]) -1
    print(b)
    count2 = count2 - max(0,count2-a[i])
    if b > 0:
        count += b
print(count)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
A=[]
B=[0,0,0,0,0]
aa=int((n-0.1)//a)+1
ba=int((n-0.1)//b)+1
ca=int((n-0.1)//c)+1
da=int((n-0.1)//d)+1
ea=int((n-0.1)//e)+1
A.extend([aa,ba,ca,da,ea])
print(A)
for i in range(4):
    for j in range(i+1,5):
        if A[i]<A[j]:
            A[j]=A[j]-A[i]
        else:
            A[j]=0
print(A)
ans = 5+A[0]+A[1]+A[2]+A[3]+A[4]-1
print(ans)
            

n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
A=[]
B=[0,0,0,0,0]
aa=int((n-0.1)//a)+1
ba=int((n-0.1)//b)+1
ca=int((n-0.1)//c)+1
da=int((n-0.1)//d)+1
ea=int((n-0.1)//e)+1
A.extend([aa,ba,ca,da,ea])
for i in range(4):
    for j in range(i+1,5):
        if A[i]<A[j]:
            A[j]=A[j]-A[i]
        else:
            A[j]=0
ans = 5+A[0]+A[1]+A[2]+A[3]+A[4]-1
print(ans)
            

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
N = int(input())
A = [int(input(a)) for a in range(5)]
print(math.ceil(N / min(A)) + 4)

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
N = int(input())
iList = [int(input()) for i in range(5)]

P1toP2 = math.ceil(N / iList[0])
P2toP3 = math.ceil(iList[0] / iList[1])
P3toP4 = math.ceil(min(iList[:1]) / iList[2])
P4toP5 = math.ceil(min(iList[:2]) / iList[3])
P5toP6 = math.ceil(min(iList[:3]) / iList[4])


print(P1toP2 + P2toP3 + P3toP4 + P4toP5 + P5toP6)

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

Verdicts: Runtime Error

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

Submission attempts (in order):
n=int(input())
a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
from math import floor
print(4+floor(n/min(a,b,c,d,e)))


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)


Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e = input_tmp[1:]

min_value = min(a2e)

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


import sys

input = sys.stdin.readline

input_tmp = [int(input()) for _ in range(6)]

n = input_tmp[0]

a2e = input_tmp[1:]

min_value = min(a2e)

if n <= min_value:
    print(5)
else:
    if n % min_value != 0:
        print(n // min_value + 5)
    else:
        print(n // min_value - 1 + 5)


Verdicts: Wrong Answer

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

Submission attempts (in order):
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)


import math

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

print(math.floor(n // min([a,b,c,d,e])) + 4)


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)


Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
N, A, B, C, D, E= [float(input()) for _ in range(6)]
cities = [A, B, C, D, E]
P = [N, 0, 0, 0, 0, 0]
t = 0
while True:
  for i, c in enumerate(cities):
    s = P[i] - c
    if s < 0 :
      P[i+1] += P[i]
      P[i] = 0
    else :
      P[i+1] += c
      P[i] = s
    t += 1
  if(P[5] > 0):
    break
print(-(-N//P[5]) + t - 1)

N, A, B, C, D, E= [float(input()) for _ in range(6)]
cities = [A, B, C, D, E]
P = [N, 0, 0, 0, 0, 0]
t = 0
while True:
  for i, c in enumerate(cities):
    s = P[i] - c
    if s < 0 :
      P[i+1] += P[i]
      P[i] = 0
    else :
      P[i+1] += c
      P[i] = s
    t += 1
  if(P[5] > 0):
    break
print(int(-(-N//P[5]) + t - 1))


Verdicts: Wrong Answer

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

Submission attempts (in order):
N = int(input())
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

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

num_group = int(N / cap + 0.5)

ans = 6 + num_group - 1
print(ans)


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

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

num_group = math.ceil(N / cap)

ans = 5 + num_group - 1
print(ans)


Verdicts: Wrong Answer

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

Submission attempts (in order):
N = int(input())
x = [int(i) for i in input()]
print(len(x) + (N // min(x)))

N, *x = map(int, open(0))
print(5 - (-N // min(x)))

N, *x = map(int, input(0))
print(5 + (N // min(x)))

N, *x = map(int, open(0))
print(5 + ((N - 1) // min(x)))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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

Submission attempts (in order):
N = int(input())
ABC = []*5
for i in range(5):
  ABC[i] = int(input())
  
Amin = min(ABC)

if N%Amin ==0:
  ans = N//2-1+5
else:
  ans = N//2+5

print(ans)




N = int(input())
ABC = [0]*5
for i in range(5):
  ABC[i] = int(input())
  
Amin = min(ABC)

if N%Amin ==0:
  ans = N//Amin-1+5
else:
  ans = N//Amin+5

print(ans)




Verdicts: Runtime Error

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

Submission attempts (in order):
n = int(input())
li = []
for i in range(5):
  li.append(int(input())
m = min(li)
t = int(n / m)
print(t + 5)

n = int(input())
li = []
for i in range(5):
  li.append(int(input()))
m = min(li)
if n % m != 0:
	t = n // m
else:
  t = n // m - 1
print(t + 5)

Verdicts: Runtime Error

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

Submission attempts (in order):
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:
        
        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 N < minsuu:
                minsuu = N

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

print(kaisuu)


N = int(input())
li = []

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

kaisuu = 0
last = 0

for i in range(5):
    if N % li[i] == 0:
        hituyouNum = N // li[i]
    else:
        hituyouNum = N // li[i] + 1

    if last == 0:
        kaisuu += hituyouNum
        last = hituyouNum
        continue

    if hituyouNum - last > 0:
        kaisuu += hituyouNum-last+1
    else:
        kaisuu += 1

    last = hituyouNum

print(kaisuu)

#     print("")

#         if N % li[i] == 0:

#         else:
 + 1
#     else:

#         flg = 0

#         for j in range(i):
#             if li[j] <= li[i]:
#                 flg = 1
#                 break




#         if flg == 1:

#         else:





#                 print("a")

#             else:
#                 print("b")






N = int(input())
li = []

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

ans = 0
if N % min(li) == 0:
    ans += N // min(li)
else:
    ans += N // min(li) + 1

print(ans+4)


Verdicts: Wrong Answer

Wrong Answer

Accepted