TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
#L, R = map(int,input().split())
H,N = map(int,input().split())
A = list(map(int,input().split()))
 
a = 0
for i in A:
  a += i
  
if a>=H:
  print("Yes")
else:
  print("No")

#L, R = map(int,input().split())
H,A = map(int,input().split())

r = H % A
if r == 0:
  ans = H/A
else:
  ans = (H-r)/A+1

print(int(ans))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

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

i = 0

while h > 0:
    h = h - a
    i += 1

print(i)

H = input()
arr = [int(i) for i in H.split(' ')]
count = 1
if(arr[0]<arr[1]):
	print(count)
else:
	while arr[0]>arr[1]:
		arr[0] = arr[0] - arr[1]
		count = count + 1
	print(count)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = input().split(" ")
print((H+A-1)//A)

H, A = input().split(" ")
H = int(H)
A = int(A)
return (H+A-1)//A

H, A = input().split(" ")
return (H+A-1)//A

H, A = input()
num = (H + (A-1))//A
print(num)

H, A = input().split(" ")
H = int(H)
A = int(A)
print((H+A-1)//A)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())

print(H // A + min(H % A))


H, A = map(int, input().split())

print(H // A + min(H % A, 1))


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())
int(H/A)+1

H, A = map(int, input().split())
if int(H/A)==H/A:
    print(int(H/A))
else:
    print(int(H/A)+1)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
def main():
    hp, num = map(int, input().split())
    a = list(map(int, input().split()))
    attack = sum(a)

    if hp > attack:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()


H, A = map(int,input().split())
print(-(-H//A))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
N, K = map(int, input().split())
H = map(int, input().split())

H.sorted(reverse=True)

if K >= N:
    print(0)
else:
    for i in range(K):
        del H[i]
    print(sum(H))


H, A = map(int, input().split(" "))

print(-(-H//A))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
N, K= map(int, input().split())
Nli = [int(x) for x in input().split()]
Nli.sort()
if N > K:print(sum(Nli[0:N-K]))
else: print(0)

H, A = map(int, input().split())
times = H / A
if int(times) == times:
    print(int(times))
else:
    print(int(times) + 1)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,A =map(int,input())
print((H//A)+1)


H,A =map(int,input().split())
print(H//2+1)

a,b=map(int,input().split())
s=sum(map(int,input().split()))
print("Yes" if a>=s else "No")


H,A =map(int,input().split())
print((H//2)+1)

H,A =map(int,input().split())
print(H//A+(1 if not H%A==0 else 0))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int,input.split())
count = 0
while H > 0:
  H -= A
  count += 1
  
print(count)

H, A = map(int,input().split())
count = 0
while H > 0:
  H -= A
  count += 1
  
print(count)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())

a = int(H/A)
b = int(H%A)

if (b!=0)and(H>A):
  b+=1

print(a)

H, A = map(int, input().split())

a = int(H/A)
b = int(H%A)

if b!=0:
  a+=1

print(a)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
def attk(HP,Magic,D0):
    T = HP // Magic[0][0]
    MD0 = T * Magic[0][1]
    MD1 = (T+1) * Magic[0][1]
    Z = HP % Magic[0][0]
    ND = Magic[0][1]
    if Z == 0:
        return MD0
    if len(Magic) == 1:
        return MD1
    Magic.pop(0)
    A = attk(Z,Magic,ND)
    if D0 > MD0+A:
        if MD1 > MD0+A:
            return MD0+A
        else:
            return MD1
    else:
        return D0



H,N = map(int,input().split())
A =[]
for i in range(N):
    a,b = map(int,input().split())
    A.append((a,b,a/b))
#print(A)
B = sorted(A, key=lambda s: s[1]) 
C = sorted(B, key=lambda s: s[2], reverse=True) 
#print(C)

for i in range(N-1):
    if C[N-1-i][2] ==C[N-2-i][2]:
        C.pop(N-1-i)
#print(C)
TDMAX = (H // C[0][0])*C[0][1]
if (H%C[0][0])!=0:
    TDMAX += C[0][1]
TD = attk(H,C,TDMAX)
print(TD)

H,N = map(int,input().split())
Magic =[]
A =[]
E =[]
for i in range(N):
    a,b = map(int,input().split())
    Magic.append((a,b))
    A.append(a)
    E.append(a/b)
MAX_A = H+max(A)
E_MIN = min(E)
WORST = int(MAX_A/E_MIN) +2
#print(Magic)
#print(MAX_A)
#print(WORST)
DP = [[WORST] * (MAX_A+1) for i in range(N)]
for i in range(N):
    if i == 0:
        for j in range(1,MAX_A//Magic[0][0]+1):
            DP[0][j*Magic[0][0]] = Magic[0][1]*j
    else:
        for j in range(1,(MAX_A+1)):
#            KARI = []
            DP[i][j]=DP[i-1][j]
            if j % Magic[i][0] == 0:
                DP[i][j]=min(DP[i][j],((j//Magic[i][0]) * Magic[i][1]))
            r = j // Magic[i][0]
            for k in range(r):
                DP[i][j]=min(DP[i][j],(DP[i-1][j-k*Magic[i][0]]+k*Magic[i][1]))
print(min(DP[N-1][H:MAX_A]))

                
            
        


H,A = map(int,input().split())
X = int(H // A)
if (H%A)!=0:
    X += 1
print(X)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = input().split;
h = int(h);
a = int(a);

if h % a == 0:
  ans = int(h // a);
else:
  ans = int(h // a + 1);
  
print(ans);

h, a = input().split();
h = int(h);
a = int(a);

if h % a == 0:
  ans = int(h // a);
else:
  ans = int(h // a + 1);
  
print(ans);


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())


if H/A % 2 == 0:
    count_e = H/A
    print(int(count_e))
    
elif int(H/A) % 2 == 1:
    count_o = int(H/A) + 1
    print(count_o)
    
elif H < A:
    count_u =  1
    print(count_u)

H, A = map(int, input().split())


if H % A == 0:
    count_e = H//A 
    print(count_e)

elif H < A:
    count_u =  1
    print(count_u)
    
elif  H % A != 0:
    count_o = H // A + 1
    print(count_o)
    


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)

a,b=map(int,input().split())
if a%b==0:
    print(a//b)
else:
    print(a//b+1)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input.split())
i = 0
while H > 0:
  H -= A
  i += 1
print(i)


H, A = map(int, input.split())
i = 0
while H <= 0:
  H -= A
  i += 1
print(i)

H, A = map(int, input().split())
i = 0
while H > 0:
  H -= A
  i += 1
print(i)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
N, M=map(int,input().split())
count=0
X=0
while N >= X:
  X = M * count
  count += 1
print(count)

N, M=map(int,input().split())
count=1
X=0
while N > X:
  X = M * count
  count += 1
print(count-1)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = list(map(int, input().split()))
print((h-a+1)//a)

h, a = list(map(int, input().split()))
print((h+a-1)//a)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = [int(x) for x in input().split()]
print(math.ceil(H/A))

import math
H, A = [int(x) for x in input().split()]
print(math.ceil(H/A))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = int(input())
cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print(cnt)

h = int(input())
a = int(input())
cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print('{}'.format(cnt))

h = int(input())
a = int(input())
cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print(cnt)

h, a = input()

h = int(h)
a = int(a)

cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print(cnt)

h = int(input())
a = int(input())
cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print(cnt)

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

cnt = 0

while (h > 0):
	h -= a
	cnt += 1

print(cnt)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H = input()
A = input()
count = 0


while H > 0:
    H -= A
    count +=1
else:
    print(count)

H = input()
A = input()
count = 0


while H > A:
    H -= A
    count +=1
else:
    print(count)

H = int(input())
A = int(input())
count = 0


while H > 0:
    H -= A
    count +=1
print(count)

H,A = map(int,input().split())

"""
count = 0

while H > 0:
    H -= A
    count +=1

print(count)

"""

H = int(input())
A = int(input())
count = 0


while H > 0:
    H -= A
    count +=1
else:
    print(count)

H,A = map(int,input().split())


count = 0

while H > 0:
    H -= A
    count +=1

print(count)



Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = input().split()
print(int(h/a) + 1)

h, a = input()
print(int(h/a) + 1)

h, a = input().split()
print(int(h)/int(a) + 1)

h, a = input()
print(int(h)/int(a) + 1)

import math
 
h, a = map(int, input().split())
print(math.ceil(h/a))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
A,B=map(int,input().split())
C=list(input())
count= 0
for i in range (B):
	count=count+int(C[i])
if count<=A:
	print("Yes")
else: print("No")

A,B=map(int,input().split())
C=list(input().split())
count= 0
for i in range (B):
	count=count+int(C[i])
if count>=A:
	print("Yes")
else: print("No")

A,B=map(int,input().split())
C=list(input())
count= 0
for i in range (B):
	count=count+int(C[i])
if count>=A:
	print("Yes")
else: print("No")

import math
a, b = map(int, input().split()) 
print(math.ceil(a/b))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,N = map(int,input().split())
A = input().split()
if H - (int(sorted(A)[-1]) + int(sorted(A)[-2])) <= 0:
    print("Yes")
else:
    print("No")

H,N = map(int,input().split())
A = input().split()
if H - (int(sorted(A)[-1]) + int(sorted(A)[-2])) > 0:
    print("Yes")
else:
    print("No")

enemmyCountN,killerTimeK = map(int,input().split())
enemyHp = input().split()

enemyHp.sort()

resultEnemyCount = enemmyCountN - killerTimeK
countNormal = 0


for i in range(resultEnemyCount):
    countNormal += int(enemyHp[i])

print(countNormal)

enemmyCountN,killerTimeK = map(int,input().split())
enemyHp = input().split()

intEnemyHp = [int(i) for i in enemyHp]
intEnemyHp.sort()

resultEnemyCount = enemmyCountN - killerTimeK
countNormal = 0

if killerTimeK >= enemmyCountN:
    print(0)

else:
    for i in range(resultEnemyCount):
        countNormal += intEnemyHp[i]
    print(countNormal)

h,a = input().split()
result = int(h)
times=0
while result > 0:
    result-=int(a)
    times+=1
print(times)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split(" "))
print(H//A + (1 if H%A ==0 else 0))


hp, _ = map(int, input().split(" "))
s = sum(map(int, input().split(" ")))
print((hp - s) <= 0)


H, A = map(int, input().split(" "))
print(H//A + (1 if H%A != 0 else 0))


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math
H,A = list(map(int, input().split()))

print(math.ceil(H / a))

#!/usr/bin/env python3
import sys
import math

def solve(H: int, A: int):
    print(math.ceil(H / A))
    return 0


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

if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,A = map(int,input().split())
print(H/A//1)

H = input()
A = input()
print(H/A//1)

H,A = map(int,input().split())
if A == 0:
    print(0)
b = H/A//1
if H/A > b:
    print(int(b+1))
else:
    print(int(b))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())
print(H//A)

import math
H, A = map(int, input().split())
print(math.ceil(H,A))


import math
H, A = map(int, input().split())
print(math.ceil(H/A))


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,A = (int(x) for x input().split())

if not H <= 10^4 && H >= 1:
  return False
if not A <= 10^4 && H >= 1:
  return False

int count = 0
while H >= 0:
  count=+
  H = H - A

print(count)

import math

H,A = map(int,input().split())
f, i = math.modf(H/A)

if not H <= 10^4 and H >= 1:
  False
if not A <= 10^4 and H >= 1:
  False

if f == 0:
  print(int(i))
if f != 0:
  print(int(i+1))


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,N = map(int,input().split())
A = []
B = []
for i in range(N):
    a,b = map(int,input().split())
    A.append(a)
    B.append(b)
h = 2*10**4
dp = [10**9 for i in range(h+1)]
dp[0] = 0
for i in range(N):
    a = A[i]
    b = B[i]
    for j in range(h+1):
        if j < a:
            continue
        dp[j] = min(dp[j-a]+b,dp[j])
ans = 10**9
for i in range(H,h+1):
    ans = min(ans,dp[i])
print(ans)

import math
H,A = map(int,input().split())
print(math.ceil(H/A))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = map(int, input())
print(-(-h // a))

h, a = map(int, input().split())
print(-(-h // a))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

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

count=0
while a >0:
	a -= b
	count+=1
print(count)

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

count=0
while a >0:
	a -= b
	count+=1
print(count)


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

count=0
while a >0:
	a -= b
	count+=1
print(count)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
# input
H, N = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

# process
INF = 10**9
dp = [INF]*(H+max(a for a, _ in AB))
dp[0] = 0

for i in range(H):
    if dp[i] == INF:
        continue
    for a, b in AB:
        t = dp[i]+b
        if dp[i+a] > t:
            dp[i+a] = t

# output
print(min(dp[H:]))


# input
H, A = map(int, input().split())

# output
if H%A == 0: print(H//A)
else: print(H//A+1)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = map(int, input(),split())
count = 0

while h > 0:
  count += 1
  h = h - a
 
print(count)

h, a = map(int, input().split())
count = 0

while h > 0:
  count += 1
  h = h - a
 
print(count)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, n = map(int, input().split())
a = []
b = []
for _ in range(n):
    ai, bi = map(int, input().split())
    a.append(ai)
    b.append(bi)
 
dp = [float("inf")] * (2 * 10000 + 1)
dp[0] = 0
for i in range(h):
    for j in range(n):
        if (i + a[j]) > 2 * 10000:
            dp[2 * 10000] = min(dp[2 * 10000], dp[i] + b[j])
            continue
        dp[i + a[j]] = min(dp[i + a[j]], dp[i] + b[j])
 
ans = float('inf')
for j in range(h, 2 * 10000 + 1):
    ans = min(ans, dp[j])
print(ans)

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

if h%a:
       print(h//a+1)
else:
       print(h//a)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import numpy as np
H, A =map(int, input().split())
print(np.ceil(H / A))

import numpy as np
H, A =map(int, input().split())
print(int(np.ceil(H / A)))

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h , a = map(int, input().split())

ans = h // a
if h % a == 0:
    print(ans)
esle:
    print(ans + 1)

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

ans = h // a
if h % a == 0:
    print(ans)
else:
    print(ans + 1)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
a = 0

li = input("入力してね").split()
li = [int(i) for i in li]

while 0 < li[0]:
    a += 1
    li[0] -= li[1]

print(a)

a = 0

li = input().split()
li = [int(i) for i in li]

while 0 < li[0]:
    a += 1
    li[0] -= li[1]

print(a)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
HA = input()

HA = HA.split(" ")

H = HA[0]
A = HA[1]

hit = 0

while H < 0:
  H = H - A
  hit = hit + 1

print(hit)

S = input().split(" ") 

H = int(S[0]) 
A = int(S[1]) 

atCount = 0 

while H > 0:
  H = H - A
  atCount = atCount + 1

print(atCount)



Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math 
a,b = map(int,input().split())
print(math.ceil(a/x))

import math 
a,b = map(int,input().split())
print(math.ceil(a/b))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = map(int, input())
print(h//a+1 if h%a != 0 else h//a)

h, a = map(int, input().split())
print(h//a+1 if h%a != 0 else h//a)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math
H, A = input().split()
print(math.ceil(H/A))

import math
H, A = int(input()).split()
print(math.ceil(H/A))

import math
H,A = map(int, input().split)
print(math.ceil(H/A))

import math

H,A = map(int, input().split())
print(math.ceil(H/A))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = map(int, input().split())
print(-(-h//2))

h, a = map(int, input().split())
print(-(-h//a))

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import sys
import math

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.ceil(hp / attack))

print(ans)

import sys

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(hp // attack)

print(ans)

import sys

args = sys.argv
if(args[0] <= args[1]):
    ans = "1"
else:
    ans = int(args[1]) / int(args[0])

print(str(ans))

import sys
import math

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.floor(hp / attack))

print(str(ans))

import sys
import math

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.ceil(hp / attack))

print(int(ans))

# -*- coding: utf-8 -*-

import sys
import math

args = sys.argv

hp = int(args[1])
attack = int(args[2])

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.floor(hp / attack))

print(str(ans))

import math

hp , attack = map(int,input().split())

if(hp <= attack):
    ans = "1"
else:
    ans = str(math.ceil(hp / attack))

print(int(ans))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
n,k = map(int,input().split())
print((n+k-1)/k)

n,k = map(int,input().split())
print((n+k-1)//k)


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h = int(input())
li = []
li.append(h)
c=1
while(h >  1):
    h= int(h/2)
    for i in range(2**c):   
        li.append(h)
    c += 1

#print(li)
print(len(li))

h,a = map(int,input().split())
c = 0
while(True):
    h = h - a
    if(h <= 0):
        c += 1
        break

    c += 1

print(c)



Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math
H, A = map(int, input().split())
print(math.ceil(H//A))

def resolve():
    import math
    H, A = map(int, input().split())
    print(math.ceil(H/A))
resolve()

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math
a = list(map(int,input().split()))
print(math.ceil((float)a[0]/a[1]))


import math
a = list(map(int,input().split()))
print(math.ceil(a[0]/a[1]))


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
hp_list = input().split(" ")
h = hp_list[0]
a = hp_list[1]
x = h / a
y = h // a
if (x == y):
  count = x
else:
  count = y + 1
 
print(count)


hp_list = input().split(" ")
h = int(hp_list[0])
a = int(hp_list[1])
x = h / a
y = h // a
if (x == y):
  count = x
else:
  count = y + 1

count = int(count)
print(count)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math

h = int(input())
a = int(input())
 
print(math.ceil(h/a))

h = int(input())
a = int(input())

return math.ceil(h/a)


import math

h = float(input())
a = float(input())

print(math.ceil(h/a))

import math

h = float(input())
a = float(input())
 
print(math.ceil(h/a))

import math
 
h = float(input())
enemies = [h]

count = 0
while len(enemies) > 0:
  temp = []
  for enemy in enemies:
    count+=1
    if enemy > 1:
      temp.append(round(enemy / 2))
      temp.append(round(enemy / 2))
  enemies = temp

print(count)

import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import sys


def main():
    tmp = input().split()
    h = int(tmp[0].replace('\n',''))
    a = int(tmp[1].replace('\n',''))
    n= h/a
    if (h%a >0):
        n+=1
    print(n)

if __name__ == '__main__':
    input = sys.stdin.readline
    main()


import sys


def main():
    tmp = input().split()
    h = int(tmp[0].replace('\n',''))
    a = int(tmp[1].replace('\n',''))
    n= h/a
    if (h%a >0):
        n+=1
    print(int(n))

if __name__ == '__main__':
    input = sys.stdin.readline
    main()


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math

H, A = map(int, input().split(' '))

print(math.floor(H / A))


import math

H, A = map(int, input().split(' '))

print(math.ceil(H / A))


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, A = map(int, input().split())
print(int(H/A))

from math import ceil
H, A = map(int, input().split())
print(ceil(H/A))

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H = 10
A = 2

if H % A == 0:
    print(int(H/A))
else:
    print((H//A) + 1)

H,A = map(int, input().split())

if H % A == 0:
    print(int(H/A))
else:
    print((H//A) + 1)


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H, N = map(int, input().split())

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

s_sum = sum(s)

if s_sum < H:
  print('No')
else:
  print('Yes')

H, A = map(int, input().split())
counter = 0

while H > 0:
  H -= A
  counter += 1
  
print(counter)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import sys

def use_dp():
    max_a = max([ab[0] for ab in AB])
    dp = [sys.maxsize for i in range(H+max_a)]
    dp[0] = 0

    
    for i in range(H):
        if dp[i] == sys.maxsize:
            continue
        
        for j in range(N):
            a = i + AB[j][0]
            b = dp[i] + AB[j][1]
            if dp[a] > b:
                dp[a] = b

    
    min_mp = sys.maxsize
    for i in range(H, H+max_a):
        min_mp = min(dp[i], min_mp)

    print(min_mp)


if __name__ == '__main__':
    H, N = list(map(int, input().split()))
    AB = []
    for n in range(N):
        AB.append(list(map(int, input().split())))

    use_dp()

import math

H, A = list(map(int, input().split()))

N = math.ceil(H/A)

print(N)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
s = list(map(int,input().split()))
m = list(map(int,input().split()))

a=s[0]
for i in range(s[1]):
  a -= m[i]

if a <= 0:
  print("Yes")
else:
  print("No")

s = [list(map(int,input().split())) for i in range(2)]

p = s[0][0]
a = 0
for i in range(s[0][1]):
  a += s[1][i]

r = "Yes"
if p > a:
  r = "No"

print(r)

s = [list(map(int,input().split())) for i in range(2)]

a=0
for i in range(s[0][1]):
  a += s[1][i]

r = "Yes"
if a < s[0][0]:
  print("No")
else:
  print("Yes")

s = [list(map(int,input().split())) for i in range(2)]

a=s[0][0]
for i in range(s[0][1]):
  a -= s[1][i]

if a <= 0:
  print("Yes")
else:
  print("No")

s = [list(map(int,input().split())) for i in range(2)]

p = s[0][0]
a = 0
for i in range(s[0][1]):
  a += s[1][i]

r = "Yes"
if p > a:
  r = "No"

print(r)

s = list(map(int,input().split()))
a = s[0] // s[1]
b = s[0] % s[1]
if b != 0:
  a +=1
print(a)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = map(int, input().split())
cnt = round(h // a)
print(cnt)

h, a = map(int, input().split())
cnt = - ( -h // a)
print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
a,b =map(int,input().split())
if a%B==0:
  print(a/b)
else:
  print(1+a//b)

a,b =map(int,input().split())
if a%B==0:
  print(a/b)
else:
  print(1+(a//b))


a, b = map(int, input().split())
if a % b == 0:
    print(a//b)
else:
    print(1+a//b)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H,N = map(int,input().split())
A = list(map(int,input().split()))
s = sum (A)
if s>=H:
  print("Yes")
else:
  print("No")

H,N = map(int,input().split())
A = list(map(int,input().split()))

if sum(A)>=H:
  print("Yes")
else:
  print("No")

H,N = map(int,input().split())
A = list(map(int,input().split()))
if sum(A)>=H:
  print("Yes")
else:
  print("No")

H,A = map(int,input().split())

if H%A==0:
  print(H//A)
else:
  print(H//A+1)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):

def main():
    
    h,a = map(int, input().split())

    if h%a== 0:
        print(h//a)
    else:
        prinbt(h%a+1)


if __name__ == '__main__':
    main()




def main():
    
    h,a = map(int, input().split())

    if h <= a:
        print(1)

    elif h%a== 0:
        print(h//a)
    else:
        print(h//a+1)


if __name__ == '__main__':
    main()



Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h, a = int(input())
if (h%a == 0):
  print(h//a)
else:
  print(h//a + 1)

h, a = map(int,input().split())
if (h%a == 0):
  print(h//a)
else:
  print(h//a + 1)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
a, b = map(int, input().split())
c = 0
while a > 0:
  a -= b
  c += 1
print(c

a, b = map(int, input().split())
c = 0
while a > 0:
  a -= b
  c += 1
print(c)

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
h,a=map(int,input().split())
if h%a==0:
  print((int(h/a))
else:
  print((int(h/a)+1))

h,a=map(int,input().split())
if h%a==0:
  print((int(h/a)))
else:
  print((int(h/a)+1))

Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
a,b=map(int,input().split())
i=0
while a>b:
  a-=b
  i+=1
print(i) 

a,b=map(int,input().split())
i=0
while a>0:
  a-=b
  i+=1
print(i) 


Verdicts: Wrong Answer

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
H = int(input())

def func(h):
    if h == 1:
        return 1
    else:
        return func(h // 2) * 2 + 1

r = func(H)
print(r)



H, A = map(int, input().split())

R1 = H // A
R2 = 1 if H % A > 0 else 0
print(R1 + R2)


Verdicts: Runtime Error

Accepted
Problem: Serval is fighting with a monster.  The _health_ of the monster is H.  In one attack, Serval can decrease the monster's health by A. There is no other way to decrease the monster's health.  Serval wins when the monster's health becomes 0 or below.  Find the number of attacks Serval needs to make before winning.

Submission attempts (in order):
import math
H, A map(int, input().split())

print(math.ceil(H / A))

import math
H, A = map(int, input().split())
 
print(math.ceil(H / A))

Verdicts: Runtime Error

Accepted