Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03244 (python)

Fixed submission:
n1 = int(input())

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

n3 = []
n4 = []
for i1 in range(n1):
    if i1 % 2 == 0:
        n3.append(n2[i1])
    else:
        n4.append(n2[i1])

n3.sort()
n4.sort()

t1 = 0
c1 = 0
n5 = []

for i2 in range(len(n3)):
    if n3[i2] == t1:
        c1 += 1
        if i2 == len(n3) - 1:
            n5.append([t1, c1])
    else:
        if i2 != 0:
            n5.append([t1, c1])
        t1 = n3[i2]
        c1 = 1
        if i2 == len(n3) - 1:
            n5.append([t1, c1])

t1 = 0
c1 = 0
n6 = []
for i3 in range(len(n4)):
    if n4[i3] == t1:
        c1 += 1
        if  i3 == len(n4) - 1:
            n6.append([t1, c1])
    else:
        if i3 != 0:
            n6.append([t1, c1])
        t1 = n4[i3]
        c1 = 1
        if  i3 == len(n4) - 1:
            n6.append([t1, c1])

n5.sort(key=lambda x:(x[1],x[0]), reverse=True)
n6.sort(key=lambda x:(x[1],x[0]), reverse=True)

r1 = 0

if len(n5) == 1 and len(n6) == 1 and n5[0][0] == n6[0][0]:
     r1 = n1 // 2
else:
    if n5[0][0] != n6[0][0]:
        r1 = n1 - n5[0][1] - n6[0][1]
    else:
        if len(n5) == 1:
            r1 = n1 - n5[0][1] - n6[1][1]
        elif len(n6) == 1:
            r1 = n1 - n5[1][1] - n6[0][1]
        else:
            if (n1 - n5[0][1] - n6[1][1]) >= (n1 - n5[1][1] - n6[0][1]):
                r1 = r1 = n1 - n5[1][1] - n6[0][1]
            else:
                r1 = n1 - n5[0][1] - n6[1][1]

print(r1)

Buggy submission (verdict: Runtime Error):

n1 = int(input())

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

n3 = []
n4 = []
for i1 in range(n1):
    if i1 % 2 == 0:
        n3.append(n2[i1])
    else:
        n4.append(n2[i1])

n3.sort()
n4.sort()

t1 = 0
c1 = 0
n5 = []

for i2 in range(len(n3)):
    if n3[i2] == t1:
        c1 += 1
        if i2 == len(n3) - 1:
            n5.append([t1, c1])
    else:
        if i2 != 0:
            n5.append([t1, c1])
        t1 = n3[i2]
        c1 = 1
        if i2 == len(n3) - 1:
            n5.append([t1, c1])

t1 = 0
c1 = 0
n6 = []
for i3 in range(len(n4)):
    if n4[i3] == t1:
        c1 += 1
        if  i3 == len(n4) - 1:
            n6.append([t1, c1])
    else:
        if i3 != 0:
            n6.append([t1, c1])
        t1 = n4[i3]
        c1 = 1
        if  i3 == len(n4) - 1:
            n6.append([t1, c1])

n5.sort(key=lambda x:x[1], reverse=True)
n6.sort(key=lambda x:x[1], reverse=True)

t2 = 0
t2 = 0

r1 = 0

for i4 in range(n1 // 2):
    if i4 == (n1 // 2) - 1:
        r1 = n1 // 2
        break
    if n5[i4][0] == n6[i4][0]:
        if n5[i4][1] > n6[i4][1]:
            r1 = n1 - n5[i4][1] - n6[i4 + 1][1]
            break
        elif n5[i4][1] < n6[i4][1]:
            r1 = n1 - n5[i4 + 1][1] - n6[i4][1]
            break
    else:
        r1 = n1 - n5[i4][1] - n6[i4][1]
        break

print(r1)
Problem p02848 (python)

Fixed submission:
n = int(input())
strings = input()
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

new_strings = ''
for s in strings:
    index = letters.index(s)
    added_index = index + n
    new_index = added_index % 26
    new_s = letters[new_index]
    new_strings += new_s

print(new_strings)

Buggy submission (verdict: Runtime Error):
n = int(input())
strings = input()
letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'

new_strings = ''
for s in strings:
    index = letters.index(s)
    added_index = index + n
    new_index = added_index % 26
    new_s = letters[new_index]
    new_strings += new_s

print(new_strings)
Problem p02783 (python)

Fixed submission:
h, a = map(int, input().split())
print(h // a + bool(h % a))

Buggy submission (verdict: Runtime Error):
h, a = map(int, input().split())
print(h // a + boll(h % a))
Problem p03006 (python)

Fixed submission:
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
l.sort()
for i in range(N-1):
        for j in range(1, N-i):
                p = int(l[i+j][0] - l[i][0])
                q = int(l[i+j][1] - l[i][1])
                pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
if N == 1:
        print(1)
else:
        cnt = cntl[0][1]
        print(N - cnt)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
l.sort()
for i in range(N-1):
        p = l[i+1][0] - l[i][0]
        q = l[i+1][1] - l[i][1]
        pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
cnt = cntl[0][1]
print(N - cnt)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
for i in range(N-1):
        for j in range(1, N-i):
                p = l[i+j][0] - l[i][0]
                q = l[i+j][1] - l[i][1]
                pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
cnt = cntl[0][1]
print(N - cnt)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
for i in range(N-1):
        p = l[i+1][0] - l[i][0]
        q = l[i+1][1] - l[i][1]
        if p!=0 and q!=0:
                pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
cnt = cntl[0][1]
print(N - cnt)

Buggy submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
l = []
pql = []
for i in range(N):
        x, y = map(int, input().split())
        l.append((x,y))
for i in range(N-1):
        p = l[i+1][0] - l[i][0]
        q = l[i+1][1] - l[i][1]
        pql.append((p,q))
pq = Counter(pql)
cntl = pq.most_common(1)
cnt = cntl[0][1]
print(N - cnt)
Problem p03470 (python)

Fixed submission:
N = int(input())
d = []
for i in range(N):
    d.append(int(input()))
print(len(set(d)))

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
s = input()
ans = 0
for i in range(len(s)):
    if s[i] == "-":
        if i == a and len(s)-i-1 == b:
            ans = 1
            for j in range(b):
                if s[-j] == "-":
                    ans = 0
                    break
            break
if ans == 0:
    print("No")
else:
    print("Yes")
Problem p03486 (python)

Fixed submission:
s = list(input())
t = list(input())
s.sort()
t.sort()
t.reverse()
for i in range(min(len(s),len(t))):
    if s[i] < t[i]:
        print("Yes")
        break
    elif s[i] == t[i]:
        if s[min(len(s),len(t))-1] == t[min(len(s),len(t))-1]:
            if len(s) < len(t):
                print("Yes")
                break
            else:
                print("No")
                break
        continue
    else:
        print("No")
        break

Buggy submission (verdict: Runtime Error):
s = list(input())
t = list(input())
s.sort()
t.sort()
t.reverse()
for i in range(len(s)):
    if s[len(s)-1] == t[len(s)-1]:
        if len(s) < len(t):
            print("Yes")
        else:
            print("No")
        break
    if s[i] < t[i]:
        print("Yes")
        break
    elif s[i] == t[i]:
        continue
    else:
        print("No")
        break
Problem p03738 (python)

Fixed submission:
a = int(input())
b = int(input())
if a > b:
    print("GREATER")
if a == b:
    print("EQUAL")
if a < b:
    print("LESS")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
if a > b:
    print("GREATER")
elif a = b:
    print("EQUAL")
else:
    print("LESS")
Problem p04030 (python)

Fixed submission:
s = input()
ans =[]
for i in range(len(s)):
    if s[i] == '0':
        ans.append('0')
    elif s[i] == '1':
        ans.append('1')
    elif len(ans) != 0:
        ans.pop(-1)
print(''.join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
ans =[]
for i in range(len(s)):
    if s[i] == '0':
        ans.append('0')
    elif s[i] == '1':
        ans.append('1')
    elif s[i] == 'B':
        ans.pop(-1)
print(''.join(ans))
Problem p04043 (python)

Fixed submission:
a = list(map(int, input().split()))

a.sort()

if a == [5,5,7]:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
a = list(map(int, raw_input().split()))

a.sort()

if a == [5,5,7]:
    print("YES")
else:
    print("NO")
Problem p02917 (python)

Fixed submission:
n = int(input())
b = list(map(int, input().split()))
c = []
c.append(b[0])
for i in range(1,n-1):
	c.append(min(b[i-1], b[i]))
c.append(b[-1])
print(sum(c))

Buggy submission (verdict: Runtime Error):
n = int(input())
b = list(map(int, input().split()))
b = b[::-1]
a = []
cont0 = False
a.append(b[0])
if len(b) == 1:
	print(2*b[0])
	quit() 
if b[0] > b[1]:
	a.append(b[1])
	a.append(b[1])
elif b[0] == b[1]:
	a.append(b[0])
	a.append(b[0])
elif b[0] < b[1]:
	a.append(b[0])
	a.append(b[1])
if len(b) == 2:
	print(sum(a))
	quit()
for i in range(2,n-1):
	if not cont0
		if b[i-2] > b[i-1]:
			if b[i-1] > b[i]:
				a[-1] = b[i]
				a.append(b[i])
			elif b[i-1] == b[i]:
				a.append(b[i])
			else:
				a.append(b[i])
		elif b[i-2] == b[i-1]:
			if b[i-1] > b[i]:
				a[-1] = b[i]
				a.append(b[i])
			elif b[i-1] == b[i]:
				a.append(b[i])
			else:
				a.append(b[i])
		elif b[i-2] < b[i-1]:
			if b[i-1] > b[i]:
				a[-1] = 0
				a.append(0)
				cont0 = True
			elif b[i-1] == b[i]:
				a.append(b[i])
			else:
				a.append(b[i])
	else:
		if b[i-1] < b[i]:
			a.append(b[i])
		else:
			a.append(0)
		cont0 = False

print(sum(a))
Problem p02921 (python)

Fixed submission:
s = input()
t = input()

print(sum([1 for i in range(3) if s[i] == t[i]]))

Buggy submission (verdict: Runtime Error):
s = input()
t = input()

print(sum[1 for i in range(3) if s[i] == t[i]])
Problem p03251 (python)

Fixed submission:
n,m,x,y = list(map(int, input().split()))
xs = list(map(int, input().split()))
ys = list(map(int, input().split()))

xs2 = sorted(xs)
ys2 = sorted(ys)
for i in range(x+1, y+1):
	if xs2[-1] < i <= ys2[0]:
		print("No War")
		quit()
print("War")

Buggy submission (verdict: Runtime Error):
n = int(input())

def zorome(n):
	l = []
	while n > 0:
		l.append(n%10)
		n = n//10
	return l

for i in range(n, 1000):
	ll = zorome(n)
	if ll[0] == ll[1] and ll[1] == ll[2]:
		break
	n += 1
print(n)
Problem p03308 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))

print(max(a)-min(a))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))

Buggy submission (verdict: Runtime Error):
n = int(input())
a = [int(input) for i in range(n)]
dist = []
for i in range(n):
    for j in range(n):
        if i >= j:
            continue
        dist.append(abs(a[i]-a[j]))
print(max(dist))
Problem p03161 (python)

Fixed submission:
import numpy as np

# 足場は1~N 添え字は0~N-1
# 足場iの最小値は、min(dp[j]+abs(h[i]-h[j]))  min(0,i-K)<=j<=i-1<i
# 参照させてもらいました　https://harutech.hateblo.jp/entry/2019/02/10/202515　

# 入力 添え字のN-1が足場Nに相当する
N, K = map(int, input().split())
h = np.array(list(map(int, input().split())))

# 初期化
dp = np.zeros(N, dtype=np.int)

dp[0] = 0
for i in range(1, N):
    start = max(0, i - K)
    dp[i] = np.min(dp[start:i] + np.abs(h[i] - h[start:i]))

print(dp[N - 1])

Buggy submission (verdict: Runtime Error):
# 足場は1~N 添え字は0~N-1
# 足場が1~Kまでのとき、dp[i+1]を求めるには、dp[j]+abs(h[i+1]-h[j]) 0<=j<=iの最小値を求める
# 1<=i+1<=Kのとき
# dp[1] = abs(h[1] - h[0])
# dp[K] dp[K-1]+abs(h[K]-h[K-1]), , ,dp[1]+abs(h[K]-h[1]), dp[0]+abs(h[K]-h[0])

# 足場がK+1~Nまでのとき(K+1<=i+1<=N-1のとき)
# dp[K+1] dp[K]+abs(h[K+1]-h[K]), , ,dp[1]+abs(h[K+1]-h[1])
# dp[N-1] dp[N-2]+abs(h[N-1]-h[N-2]), , ,dp[N-K-1]+abs(h[N-1]-h[N-K-1])
# dp[i+1]を求めるには、dp[j]+abs(h[i+1]-h[j]) i+1-K<=j<iの最小値を求める

# 初期化
# dp_jはdp[i+1]を求める際に使用する
dp = []
dp_j = []
for i in range(100001):
    dp.append(float('inf'))
for i in range(101):
    dp_j.append(float('inf'))

# 入力 添え字のN-1が足場Nに相当する
N, K = map(int, input().split())
h = list(map(int, input().split()))

dp[0] = 0
for i in range(N - 1):
    if 0 <= i and i <= K - 1:
        for j in range(i + 1):
            dp_j[j] = dp[j] + abs(h[i + 1] - h[j])
        dp[i + 1] = min(dp_j)

    else:
        for j in range(i + 1 - K, i+1):
            dp_j[j] = dp[j] + abs(h[i + 1] - h[j])
        for j in range(i + 1 - K):
            dp_j[j] = float('inf')
        dp[i + 1] = min(dp_j)

print(dp[N - 1])
Problem p03164 (python)

Fixed submission:
# dp[v] i番目までの品物で、価値がv以上になるよう選んだときの重さの最小値。
# 品物を増やすごとに、配列を更新して使いまわす。
# とれる価値の最大値VmaxはN*max(vi) 添え字は0<=v<=Vmax dpリストの長さはVmax+1
# ループは1~N回回す　添え字は0<=i<=N-1<N
# 解答はN回ループした後のdp[j]<=Wとなる最大のj

import numpy as np

# 入力 table[i][0]は重さ、table[i][1]は価値
N, W = map(int, input().strip().split())
t = []
for i in range(N):
    t.append(list(map(int, input().strip().split())))
table = np.array(t)

# 初期化 wiの最大値は10^9
Vmax = N * max(table[:, 1])
dp = np.full(Vmax + 1, 10 ** 9)
dp[0] = 0

# dp
for i in range(N):
    w = table[i][0]
    v = table[i][1]
    dp[v:] = np.minimum(dp[v:], dp[:-v] + w)

# 解答　dpの後ろから見て、最初にWを下回ったときのi
for j in range(Vmax, 0, -1):
    if dp[j] <= W:
        print(j)
        break

Buggy submission (verdict: Runtime Error):
import numpy as np

# 入力
# 重さと価値はループのなかで都度取得する
N, W = map(int, input().strip().split())

# 初期化
dp = np.zeros(W + 1, dtype='int64')

# dpテーブル
for i in range(N):
    w, v = map(int, input().strip().split())
    dp[w:] = np.maximum(dp[w:], dp[:-w] + v)

print(dp[-1])
Problem p03059 (python)

Fixed submission:
#!/bin/env python
  
import sys

def validate(input):
    if input < 0 or input > 20:
        return False
    return True

def biscuitGen(input_a, input_b, input_t):
    biscuits = 0
    if validate(input_a) and validate(input_b) and validate(input_t):
        biscuits = int(input_t / input_a) * input_b
    return biscuits

if __name__=='__main__':
    '''
    print how many biscuit will be generated 
    A: Seconds to generate biscuit
    B: Number of biscuit pieces to generate once
    T: Limit of the seconds to generate biscuit
    1 <= A,B,T <= 20
    '''
    biscuit = 0
    inarray = list(map(int,input().split()))
    if len(inarray) != 3:
        print("Please input 3 numbers")
        sys.exit()
    biscuit = biscuitGen(inarray[0], inarray[1], inarray[2])
    print(biscuit)

Buggy submission (verdict: Runtime Error):
#!/bin/env python
  

if __name__=='__main__':
  val_n = input()
  list_v = list(map(int,input().split()))
  list_c = list(map(int,input().split()))

  answer = 0
  for i in range(len(list_v)):
    if(list_v[i] - list_c[i] > 0):
      answer += list_v[i] - list_c[i]
  print(answer)
Problem p02945 (python)

Fixed submission:
A, B = map(int, input().split())

print(max([A+B, A-B, A*B]))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input().split())

print(max([A+B, A-B, A*B])

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

print(max([A+B, A-B, A*B]))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())

result = A + B
if A - B > result:
  result = A - B
if A * B > result:
  result = A * B
print(result)
Problem p02957 (python)

Fixed submission:
A, B = map(int, input().split())

if A%2 != B%2:
  print("IMPOSSIBLE")
else:
  print(int((A+B)/2))

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())

if A%2 != B%2:
  print("IMPOSSIBLE")
else:
  print((A+B)/2)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())

if A%2 != B%2:
  print("IMPOSSIBLE")
else
  print((A+B)/2)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())

if A%2 != B%2:
  print("IMPOSSIBLE")
else
  print((A+B)/2)

Buggy submission (verdict: Runtime Error):
A, B = map(int, input())

if A%2 != B%2:
  print("IMPOSSIBLE")
else
  print(abs((A+B)/2))
Problem p02993 (python)

Fixed submission:
S = list(input())
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print("Bad")
else:
  print("Good")

Buggy submission (verdict: Runtime Error):
S = list(int(input()))

if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
  print("Bad")
else:
  print("Good")
Problem p03455 (python)

Fixed submission:
a,b = map(int, input().split())
p = a*b
if p%2 == 0:
  print("Even")
else:
  print("Odd")

Buggy submission (verdict: Runtime Error):
a,b = map(int, input().split())
p = a*b
if p%2 ==　0:
  print("Even")
else:
  print("Odd")
Problem p03494 (python)

Fixed submission:
N = int(input())
num = list(map(int, input().split()))
counter = [0] * N
for i in range(N):
  while num[i]%2==0:
    num[i] = num[i]/2
    counter[i] += 1
print(min(counter))

Buggy submission (verdict: Runtime Error):
N = int(input())
num = list(map(int, input().split()))
counter = [0] * N
for j in range(N):
  while num[i]%2==0:
    num[i] = num[i]/2
    counter[i] += 1
print(min(counter))
Problem p02787 (python)

Fixed submission:
#import numpy as np
import math

H, N = map(int, input().split())
#mahou = np.array([list(map(int, input().split())) for _ in range(N)])
mahou = [list(map(int, input().split())) for _ in range(N)]


dp = [float("inf")]*(H+1)
dp[0] = 0

for h in range(H):
  for d, m in mahou:
    new_hp = min(h + d, H)
    dp[new_hp] = min(dp[new_hp], dp[h] + m)
print(int(dp[-1]))

Buggy submission (verdict: Runtime Error):
import numpy as np
import math

H, N = map(int, input().split())
mahou = np.array([list(map(int, input().split())) for _ in range(N)])

dmg = mahou[:, 0]
mp = mahou[:, 1]

dp = np.full(H+1, float("inf"))
dp[0] = 0

for h in range(H):
  for d, m in zip(dmg, mp):
    new_hp = min(h + d, H)
    dp[new_hp] = min(dp[new_hp], dp[h] + m)
print(int(dp[-1]))
Problem p02909 (python)

Fixed submission:
#coding:utf-8

S = input()

if S == 'Sunny':
    print('Cloudy')
elif S == 'Cloudy':
    print('Rainy')
else:
    print('Sunny')

Buggy submission (verdict: Runtime Error):
#coding:utf-8

import sys

N = int(input())
S = input()

T = len(S)

for t in reversed(range(T+1)):
    i = 0
    while 0 < len(S[i:i+t-1]) and len(S[i:i+t-1]) <= len(S[i+t-1:]):
        if S[i:i+t-1] in S[i+t-1:]:
            print(len(S[i:i+t-1]))
            sys.exit()
        i += 1
print('0')

Buggy submission (verdict: Runtime Error):
#coding:utf-8

S = input()

if S == 'Sunny':
    print('Cloudy')
elif S == 'Cloudy':
    print(Rainy)
else:
    print('Sunny')
Problem p02910 (python)

Fixed submission:
#coding:utf-8

S = input()

if ('L' in set(S[0::2])) or ('R' in set(S[1::2])):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
#coding:utf-8

S = input()

if ('L' in set(S[0::2]) or ('R' in set(S[1::2]):
    print('No')
else:
    print('Yes')
Problem p02783 (python)

Fixed submission:
import sys
inputs = sys.stdin.readline()
inputs = inputs.split()
# inputs = inputs.split('')

H, A = int(inputs[0]), int(inputs[1])

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

Buggy submission (verdict: Runtime Error):
import sys
H = sys.stdin.readline()
H = int(H)

count = 0
roop_c = 2
while True:
    H = H // 2
    count += roop_c
    roop_c *= 2

    if H == 1:
        break

print(count+1)
Problem p02784 (python)

Fixed submission:
import sys
# s = sys.stdin.readlines()
inputs = sys.stdin.readline()
A = sys.stdin.readline()
inputs = inputs.split()
H, N = int(inputs[0]), int(inputs[1])
A = A.split()

A_sum = 0
for i in range(len(A)):
    A_sum += int(A[i])

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

Buggy submission (verdict: Runtime Error):
import sys
# s = sys.stdin.readlines()
inputs = sys.stdin.readline()
A = sys.stdin.readline()
inputs = inputs.split()
H, N = inputs[0], inputs[1]
A = A.split()

A_sum = 0
for i in range(len(A)):
    A_sum += A[i]

if A_sum < H:
    print('No')
else:
    print('Yes')
Problem p02783 (python)

Fixed submission:
h, a = map(int, input().split())

cnt = 0

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

print(cnt)

Buggy submission (verdict: Runtime Error):
h, a = input()

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

cnt = 0

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

print(cnt)

Buggy submission (verdict: Runtime Error):
h, a = int(input())
cnt = 0

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

print(cnt)

Buggy submission (verdict: Runtime Error):
h = int(input())
a = int(input())
cnt = 0

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

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

Buggy submission (verdict: Runtime Error):
h = int(input())
a = int(input())
cnt = 0

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

print(cnt)

Buggy submission (verdict: Runtime Error):
h = int(input())
a = int(input())
cnt = 0

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

print(cnt)
Problem p02783 (python)

Fixed submission:
import math
 
line = input()
numList = [int(num) for num in line.split(' ')]
monsterHP,servalA = numList[0],numList[1]
print(math.ceil(monsterHP/servalA))

Buggy submission (verdict: Runtime Error):
import math

line = input()
numList = [int(num) for num in line.split(' ')]
monsterHP,servalA = numList[0].numList[1]
print(math.ceil(monsterHP/servalA))
Problem p02789 (python)

Fixed submission:
n,m=map(int,input().split())

if n==m :
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n,m=map(int,input().split())

if n==m :
  print(Yes)
else :
  print(No)
Problem p02945 (python)

Fixed submission:
a,b=map(int,input().split())

x=a+b
y=a-b
z=a*b

print(max(x,y,z))

Buggy submission (verdict: Runtime Error):
a,b=int(input())

x=a+b
y=a-b
z=a*b

print(max(x,y,z))

Buggy submission (verdict: Runtime Error):
a,b=input()

x=a+b
y=a-b
z=a*b

print(max(x,y,z))
Problem p03059 (python)

Fixed submission:
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = True if mod == 0 else check(a, ret) if ret > a else False
  return value


a, b, t, biscuit = map(int, input().split() + ["0"])
for i in range(1, t + 1):
  if check(a, i):
    biscuit = biscuit + b

print(biscuit)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from functools import reduce
import fractions


def gcd(*numbers):
  return reduce(fractions.gcd, numbers)


n = int(input())
lst = list(map(int, input().split()))
min_v = min(lst)

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  # if min_v < max_gcd:
  #   break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from functools import reduce
import fractions


def gcd(*numbers):
  return reduce(fractions.gcd, numbers)


n = int(input())
lst = list(map(int, input().split()))
min_v = min(lst)

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  if min_v < max_gcd:
    break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from functools import reduce
import fractions


def gcd(*numbers):
  return reduce(fractions.gcd, numbers)


n = int(input())
lst = list(map(int, input().split()))
min_v = min(lst)

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  if min_v < max_gcd:
    break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from functools import reduce
import fractions


def gcd(*numbers):
  return reduce(fractions.gcd, numbers)


n = int(input())
lst = list(map(int, input().split()))

max_gcd = 0
for i in range(n):
  arr = lst[:i] + lst[i + 1:len(lst)]
  # if min(arr) < max_gcd:
  #   break
  wk_gcd = gcd(*arr)
  max_gcd = wk_gcd if wk_gcd > max_gcd else max_gcd

print(max_gcd)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  value = False if mod > 0 else check(a, ret) if ret >= a else True
  return value


a, b, t, biscuit = map(int, input().split() + ["0"])
for i in range(1, t + 1):
  if check(a, i):
    biscuit = biscuit + b

print(biscuit)

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
def check(a, time):
  ret, mod = divmod(time, a)
  if mod > 0:
    return False
  if ret >= a:
    return check(a, ret)
  else:
    return True


a, b, t = map(int, input().split())
biscuit = 0
for i in range(1, ((t + 1) * 2)):
  time = i / 2
  if check(a, time):
    biscuit = biscuit + b
  if time == t + 0.5:
    break

print(biscuit)