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):
H A = [int(i) for i in input().split(' ')]
print(H // A + 1)

H A = input().split(' ')
print(H // A + 1)

H, A = [int(i) for i in input().split(' ')]
print(H // A + min(H % A, 1))

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 = int(input().split())

x = 1
while True:
  if 0 =< H/(A*x):
    H -= A
    a += 1
  else:
    break
print(x)
  

from sys import stdin
H, A = map(int,stdin.readline().rstrip().split)

a = 0
while True
  if x <= H/A:
    H - A
    a += 1
  else:
    break
print(a)

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

x = 1
while True:
  if 0 <= H/(A*x):
    H -= A
    a += 1
  else:
    break
print(x)

from sys import stdin
H, A = map(int,stdin.readline().rstrip().split)

a = 0
while True:
  if x <= H/A:
    H - A
    a += 1
  else:
    break
print(a)

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

x = 0
while True:
  if H < 0:
    break
  else:
    x += 1
print(x)

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

print((H+A-1)/A)

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

x = 0
while True:
H = H - A
  if H < 0:
    break
  else:
    x += 1
print(x)

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

x = 0
while True:
  H = H - A
  if H <= 0:
    break
  if H > 0:
    x += 1
print(x)

from sys import stdin
H, A = map(int,stdin.readline().rstrip().split)

x = 1
while True:
  if 0 <= H/(A*x):
    H -= A
    a += 1
  else:
    break
print(x)

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

print((H+A-1)//A)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Time Limit Exceeded

Wrong Answer

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,n= map(int, input().split())
a = sum(list(map(int,input().split())))
print("Yes" if h-a <=0 else "No")

h,a=map(int,input().split())
print(0--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 sys

input = sys.stdin.readline
H, N = map(int, input().split())
magic = [list(map(int, input().split())) for _ in range(N)]

max_damage = max(damage for damage, cost in magic)
dp = [0] * (H + max_damage)

for x in range(1, H + max_damage):
    dp[x] = min(dp[x - damage] + cost for damage, cost in magic)

ans = min(dp[H:])

print(ans)


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

ans = (H + (A - 1)) // A

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):
from sys import stdin
f_i = stdin

H, N = map(int, f_i.readline().split())

C = [10 ** 8] * (H * 2)
C[0] = 0
for line in f_i:
    A, B = map(int, line.split())
    for i, vals in enumerate(zip(C, C[A:]), start=A):
        v1, v2 = vals
        C[i] = min(v1 + B, v2)
        if i > H:
            break

print(min(C[H:]))

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

if H % A:
    print(H // A + 1)
else:
    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):
health = int(input())
decrease = int(input())
attack = 0
while health > 0:
    health = health - decrease
    attack += 1
print(attack)

import math

H,A= list(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().split())
print(H//A  + 1 if H//A == 0 else H//A)

H, A = map(int,input().split())
print(H//A if H%A == 0 else 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, a = map(int, input().split())

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


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

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


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):
# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = list(input())
# = [tuple(map(int, input().split())) for _ in range(n)]

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

print(h // a)



# = int(input())
# = map(int, input().split())
# = list(map(int, input().split()))
# = list(input())
# = [tuple(map(int, input().split())) for _ in range(n)]

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

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

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, r = map(int, input().split())

print(max(h // r + (1 if h // r == 0 else 0), 1))


a, b = map(int, input().split())
a_b = -a // b
print(0 - a_b)


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

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()) 
    print(h,a)

    if(h<a):
        print("1")
    elif(h%a != 0):
        print(h/a+1)
    else:
        print(h/a)

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

if(h<a):
  print("1")
elif(h%a != 0):
  print(h/a+1)
else:
  print(h/a)

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

if(h<a):
  print("1")
elif(h%a != 0):
    print(h//a+1)
else:
    print(h//a)

Verdicts: 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):
x,y = map(int,input().split())

H,A = map(int,input().split())
ans = int(H/A)
if(H <= ans * A):
    print(ans)
else:
    print(ans + 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=map(int,input.split())
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):
h, a = map(int, input().split())
hits = 0
while h-a > 0:
  h = h - a
  hits += 1 
print(hits)

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

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

Verdicts: Wrong Answer

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)
float_ver = H / A
print(math.ceil(float_ver))

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

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

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):
H,A = map(int,input.split())
q,mod= divmod(H,A)

if mod >0:
  q +=1
  
print(q)

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

q,mod= divmod(H,A)

if mod > 0:
  q += 1
  
print(int(q))

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,j = map(int,input().split())
a = list(int(x) for x in input().split())
if sum(a) < h:
	print('No')
else:
	print('Yes')

n,k=map(int,input().split())
a=list(int(x) for x in input().split())
a.sort()
s=0
if k <= n:
	print(0)
else:
		s = sum(a[:n-k])
		print(s)

h=int(input())
count=0
while  h>1:
	h = h // 2
	count += 1
print(2 ** (count+1) - 1)


h=int(input())
count=0
while  h>1:
	h = h // 2
	conut += 1
print(2 ** (count+1) - 1)

n,k=map(int,input().split())
a=list(int(x) for x in input().split())
a.sort(reverse = True)
s=0
if k <= n:
	print(0)
else:
		s = sum(a[:n-k])
		print(s)

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

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())
if a>h:
  att = 1
else:
  if h%a==0:
    att = h/a
  elif h%a!=0:
    att = h/a+1
print(att)

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

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)
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):
input_1 = input("")
mylist = list(map(int, input_1.split(" ")))
H = mylist[0]
A = mylist[1]
if H % A =! 0:
  answer = H//A + 1
else:
  anser = H//A
print(answer)

input_1 = input()
mylist = list(map(int, input_1.split(" ")))
H = mylist[0]
A = mylist[1]
if H % A =! 0:
  answer = H//A + 1
else:
  anser = H//A
print(answer)


mylist = list(map(int, myinput.split(" ")))
H = mylist[0]
A = mylist[1]
H // A = C
print(C)
        

mylist = list(map(int, myinput.split(" ")))
H = mylist[0]
A = mylist[1]
x = 0
while H >0:
  H -= A
  x += 1
print(x)

myinput = input()
mylist = list(map(int, myinput.split(" ")))
H = mylist[0]
A = mylist[1]
x = 0
while H > 0:
  H -= A
  x += 1
print(x)

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

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


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

if(H % A != 0):
    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):
h, a = map(int, input().split())
print(h // a + boll(h % a))

h, a = map(int, input().split())
print(h // a + bool(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())
for i in range(H):
   H = H-4
   i += 1
   if H<= 0:
      break
print(i)

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

i = 0

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

print(i)

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())
i = list(map(int,input().split()))
ans = 0
for j in range(n):
    ans+=i[j]
    if ans >= h:
        print("Yes")
        exit()
print("No")

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,b=map(int,imput().split())
print(a//b+(1-int(a%b==0)))

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

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 = sum(map(int,input().split()))
print(["Yes","No"][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):
n, k = map(int, input().split())
h = input().split()
if (k >= len(h)):
    h.clear()
else:
    for i in range(k):
        m = max(h)
        h.remove(m)
b = 0
sum(h)
print(b)

h, n = map(int, input().split())
a = input().split()
b = 0
def has_duplicates(seq):
    return len(seq) != len(set(seq))

for i in range(n):
    b += int(a[i])
if (h > b):
    print("No")
else:
    print("Yes")

h, n = map(int, input().split())
a = input().split()
b = 0
def has_duplicates(seq):
    return len(seq) != len(set(seq))

for i in range(n):
    b += int(a[i])
if (h > b or has_duplicates(a) or len(a) > n ):
    print("No")
else:
    print("Yes")

n, k = map(int, input().split())
h = input().split()
if (k > len(h)):
    h.clear()
else:
    for i in range(k):
        m = max(h)
        h.remove(m)
b = 0
for i in range(len(h)):
    b += int(h[i])

print(b)

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


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(isn’t, input().split())
print((H + A - 1) // A)

H, A = map(int, input().split())
print((H + A - 1) // 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 fractions

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

print(fractions.ceil(h,a))

n=list(map(int,input().split()))
t = 0

if n[0] % n[1] != 0:
  t = 1

print(n[0] // n[1] + t)

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
l = input().split()
print(math.ceil(l[0]/l[1]))


from math import ceil
H, A = map(int, input().split())
print(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):
INPUT = list(input().split())
H = INT(INPUT[0])
A = INT(INPUT[1])
if H%A == 0:
  print(H//A)
else:
  print(H//A + 1)

INPUT = input().split()
H = INT(INPUT[0])
A = INT(INPUT[1])
print(H//A)

INPUT = list(input().split())
H = int(INPUT[0])
A = int(INPUT[1])
if H%A == 0:
  print(H//A)
else:
  print(H//A + 1)

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 = map(int, input().split())
cnt = 0
while H<=0:
    H //= A
    cnt += 1

print(cnt+1)

H, A = map(int, input().split())
cnt = 0
while H<=0:
    H //= A
    cnt += 1

print(cnt+1)

H, A = map(int, input().split())
cnt = 0
while H<=0:
    H //= A
    cnt += 1

print(cnt+1)

H, A = map(int, input().split())
cnt = 0
while H<=0:
    H //= A
    cnt += 1

print(cnt+1)

H, A = map(int, input().split())
cnt = 0
while H<=0:
    H //= A
    cnt += 1

print(cnt+1)

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

print((H+A-1)//A)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

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())
A=list(map(int,input().split()))
Max_A=0
for i in range(len(A)):
  Max_A=Max_A+A[i]
if Max_A>=H:
  print("YES")
else:
  print("NO")

H,A=map(int,input().split())
a=H%A
print((H+a)/A)

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

Verdicts: 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] = input().split(" ")
return int(H/A)

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


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


Verdicts: 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,N = list(map(int,input().split()))
alist = list(map(int,input().split()))
if H <= sum(alist):
  print("Yes")
else:
  print("No")

h,d = list(map(int, input().split()))
c,m = divmod(h,d)
if 0 != m:
  m = 1
print(c+m)

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.m=map(int,input().split())
print(round(n/m))

n,m=map(int,input().split())
print(round(n/m))

import math
n,m=map(int,input().split())
print(math.ceil(n/m))

Verdicts: 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):
from math import ceil
(lambda H,A : print( ceil(H/A) ))(map(int,input().split()))

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


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:
  h-=a
  count+=1
print(count)

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

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 numpy as np
N,K=input().split()
K=int(K)

A=list(map(int, input().split()))
A=np.array(A)
sort_A=np.sort(A)[::-1]
sort_A=sort_A[K:]

print(np.sum(sort_A))


import numpy as np
N,K=input().split()
N=int(N)
K=int(K)

A=list(map(int, input().split()))
A=np.array(A)
sort_A=np.sort(A)[::-1]
sort_A=sort_A[K:]

print(np.sum(sort_A))

# coding: utf-8
# Your code here!


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

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

else:
    print(int(h/a))

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=int(input().split())
if h//a==h/a:
  prinnt(h//a)
else:
  print(h//a+1)

h,a=(int(i) for i in input().split())
if h//a==h/a:
  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):
import sys

I = list(map(int, input().split()))
H = I[0]
A = I[1]
count = 0

if not 1 <= H or not H <= 10**4 or not 1 <= A or not A <= 10**4:
    print("error:1≤H≤10000,1≤A≤10000である必要があります")
    sys.exit()
# print("H =",H, "A =",A)

while True:
    H -= A
    count += 1
    print("H =",H, "A =",A)
    if H < 0:
        break
print(count)

import sys
import math

H = int(input())
count = 0

if not 1 <= H or not H <= 10**12:
    print("error:1≤H≤10^12である必要があります")
    sys.exit()

while True:
    if H <= 0:
        break
    H = math.floor(H / 2)
    count = 1 + 2*count
print(count)


import sys

I = list(map(int, input().split()))
H = I[0]
A = I[1]
count = 0

if not 1 <= H or not H <= 10**4 or not 1 <= A or not A <= 10**4:
    print("error:1≤H≤10000,1≤A≤10000である必要があります")
    sys.exit()
# print("H =",H, "A =",A)

while True:
    H -= A
    count += 1
    # print("H =",H, "A =",A)
    if H <= 0:
        break
print(count)

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(str(h//a))

import math
h,a = map(int,input().split())
print(str(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 = list(map(int, input().split))
print((H + A-1)//A)

H, A = map(int, input().split())
print((H + A-1)//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().split())
print(h//a+not not h%a)

h,a = map(int,input().split())
print(h//a+(not not 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 = list(map(int, input().split())) 
print(math.floor(h/a))

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

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

Verdicts: Wrong Answer

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()) 
A = int(input()) 
sum = 0
while H > 0 : 
  H = H - A
  sum = sum + 1
print(sum)

n = list(int(map(int,input().split()))) 
H = n[0] 
A = n[1] 
sum = 0 
while H > 0 : 
    H = H - A 
    sum = sum + 1 
print(sum)

n = list(map(int,input().split()))
H = n[0] 
A = n[1] 
sum = 0 
while H > 0 : 
    H = H - A 
    sum = sum + 1 
print(sum)

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):
a, h = map(int , input().split())
count = 0

while(h < 0){
    h -= a;
    count++
}
print(count)

h, a = list(map(int , input().split()))
count = 0
while h > 0:
    h = 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):
import math
h, a  = map(int, input().split())
print(math.ceil(h//a))

import math
h, a = map(int, input().split())
print(1 if h<a else 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):
import numpy as np
import math
H,N = (int(x) for x in input().split())
A = np.array([0]*N)
B = np.array([0]*N)
C = np.array([0.]*N)
for i in range(N):
    A[i],B[i] = (int(x) for x in input().split())
    C[i] = float(A[i]) / float(B[i])

indexs = np.argsort(-C)
A=A[indexs]
B=B[indexs]
C=C[indexs]

V=[[0]*(H+1) for i in range(N+1)]
for h in range(H+1):
    V[0][h] = B[0]*math.ceil(h/A[0])

for i  in range(N):
    for h in range(H+1):
        if h < A[i]:
            V[i+1][h] = V[i][h]
        elif V[i][h] > (V[i][h-A[i]]+B[i]):
            V[i+1][h] = (V[i][h-A[i]]+B[i])
        else:
            V[i+1][h] = V[i][h]

print(V[N][H])

import math

H,A = (float(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 = map(int,input().split())
if H % A == 0:
  print(H/A)
else:
  print(H/A + 1)

H,A = map(int,input().split())
if H % A == 0:
  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):
h,a = map(int, input().split)
ans = 0
if h % a == 0:
  ans = h // a
else:
  ans = h // a + 1
print(ans)

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

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

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):
A,B map(int,input().split())
print(int(A/B))

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

A,B = map(int,input().split())
C=A/B
if(C>int(A/B)):
  D=int(A/B)+1
else:
  D=int(A/B)
print(D)

Verdicts: 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 = int(input())  
a = int(input())  # Servant attack
x = a
attack = 1

while h > x :
    h -= x
    attack += 1

print(attack)



monsterHP, attackDamage = map(int, input().split())
attack = 1

# Calculating the number of attacks serval needs to make to win.
while monsterHP > attackDamage :
    monsterHP -= attackDamage
    attack += 1
print(attack)

# Check out my Youtube channel! https://www.youtube.com/channel/UCMOKVyAbTZOpKikTrX5dy_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().split())
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: 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 numpy as np
H, N = map(int, input().split())
A = np.array([int(num) for num in input().split()])
if H <= A.sum():
    print('Yes')
else:
    print('No')

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

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

def main():
    import math

    H = int(input())
    if H == 1:
        print(1)
    else:
        count = int(math.log(H, 2))
        ans = 0
        for i in range(count+1):
            ans += 2 ** (i)
            print(ans)

if __name__ == "__main__":
    main()

import math

def main():
    H = int(input())
    if H == 1:
        print(1)
    else:
        count = int(math.log(H, 2))
        ans = 0
        for i in range(count+1):
            ans += 2 ** (i)
            print(ans)

if __name__ == "__main__":
    main()


def main():
    H, A = map(int, input().split())
    count = 0
    while True:
        H -= A
        count += 1
        if H <= 0:
            break

    print(count)





if __name__ == "__main__":
    main()

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 = list(map(int, input().split(' ')))
ans = 0
while h > 0:
  h -= a
  ans =+ 1
print(ans)

h, a = list(map(int, input().split(' ')))
ans = 0
while h > 0:
  h -= a
  ans += 1
print(ans)


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())
result, i = 0, 1
while h > 0:
    h //= 2
    result += i
    i *= 2
    
print(result)

N, K = map(int, input().split())
Hs = map(int,input().split())
print(sum(sorted(Hs, reverse=True)[K::]))

import math

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

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

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):
userinput = input("")
userlist = userinput.split(" ")
H = int(user[0])
A = int(user[1])
numberkill = 0
if H <= 10000 and A <= 1000:
  while H > 0:
    H = H - A
    numberkill = +1
  if H < 0:
    numberkill = +1
    print(numberkill)
  else:
    print(numberkill)
else:
  print("")

firstinput = input("")
firstinputsplit = firstinput.split(" ")
H = int(firstinputsplit[0])
N = int(firstinputsplit[1])
kill = 0
if H <= 10000 and N <= 10000:
    while H > 0:
        H = H - N
        kill = kill + 1
    print(kill)
else:
    print(H)


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 = int(input())
a = int(input())
print(h // a + 1)

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

nums = input().strip().split()
h = int(nums[0])
a = int(nums[1])
if h % a == 0:
    print(h // a)
else:
    print(h // a + 1)


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):
import math
h= int(input())
a= int(input())
result = math.ceil(h/a)
print(result)




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


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())
lists = [] 
lists.append(int, input().split())
lists = lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')

N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  del lists[-K:]
  SUM = sum(lists)
  print(SUM)

H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[N-1]+lists[N-2]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    print(SUM)
  else:
      del lists[-K:-1]
      SUM = sum(lists)
      print(SUM)

N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  if K==0:
    SUM = sum(lists)
    print(SUM)
  else:
      del lists[-K:]
      SUM = sum(lists)
      print(SUM)

H,N = map(int, input().split())
lists = list(map(int, input().split())
lists.sort()
if N>=2 and lists[N-1]+lists[N-2]>=H:
  print('Yes')
If N==1 and lists[0]>=H:
  print('Yes')
if N==1 and lists[0]<H:
  print('No')
else:
  print('No')

H,N = map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if N>=2:
  if lists[-2]+lists[-1]>=H:
    print('Yes')
  else:
    print('No')
else:
  if lists[0]>=H:
    print('Yes')
  else:
    print('No')

N, K= map(int, input().split())
lists = list(map(int, input().split()))
lists.sort()
if K>=N:
  print(0)
else:
  del lists[-K:]
  SUM = sum(lists)
  print(SUM)

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

Verdicts: Runtime Error

Runtime Error

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):
H, N = map(int, input().split())
A = map(int, input().split())
sum = 0

for val in A:
	sum = sum + val

if sum >= H 
	print("Yes")
  
print("No")


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

print(int((H + A - 1) / 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().spit())
times = 0
crack = Fasle
while True:
  H -= A
  times += 1
  if H < 0:
    crack = True
  if crack:
    break
print(times)


H, A = map(int, input().split())
times = 0
crack = Fasle
while True:
  H -= A
  times += 1
  if H <= 0:
    crack = True
  if crack:
    break
print(times)

H, A = map(int, input().split())
times = 0
crack = False
while True:
  H -= A
  times += 1
  if H <= 0:
    break
print(times)

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):
X=list(map(int, input().split()))
Y=(X[0]+X[1]-1)/X[1]

print(Y)

X=list(map(int, input().split()))
Y=(X[0]+X[1]-1)/X[1]

print(int(Y))

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= [int(i) for i in input().split()]
print(math.ceil(H,A))

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

Verdicts: Runtime Error

Accepted