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

Fixed submission:
rate = int(input())
k = '1'
if (400 <= rate < 600):
    k = '8'
elif (600 <= rate < 800):
    k = '7'
elif (800 <= rate < 1000):
    k = '6'
elif (1000 <= rate < 1200):
    k = '5'
elif (1200 <= rate < 1400):
    k = '4'
elif (1400 <= rate < 1600):
    k = '3'
elif (1600 <= rate < 1800):
    k = '2'
elif (1800 <= rate < 2000):
    k = '1'
print(k)

Buggy submission (verdict: Runtime Error):
from functools import reduce
import operator

NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A_list = list(map(int, input().split(' ')))
score_list = []

for g in range(K, N+1):
    score = reduce(operator.mul, A_list[g-K: g])
    score_list.append(score)

for i in range(len(score_list) - 1):
    if (score_list[i] < score_list[i+1]):
        print('Yes')
    else:
        print('No')
Problem p02602 (python)

Fixed submission:
NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

for i in range(K, N):
    if (A[i-K] < A[i]):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

for i in range(K, N):
    if (A[i-k] < A[i]):
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
NK = list(map(int, input().split(' ')))
N = NK[0]
K = NK[1]
A = list(map(int, input().split(' ')))

score = A[0]
for i in range(1, K):
    score = score * A[i]
score_list = [score]

for i in range(K, N)
    score = score * A[i] / A[i-K]
    score_list.append(score)

for i in range(len(score_list) - 1):
    if (score_list[i] < score_list[i+1]):
        print('Yes')
    else:
        print('No')
Problem p02642 (python)

Fixed submission:
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    a = [0] * 1000005
    A_max = A[-1]

    for i in A:
        for j in range(1, A_max//i + 1):
            a[i * j] += 1

    ans = 0
    for i in A:
        if a[i] == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    a = [0] * 100005
    A_max = A[-1]

    for i in A:
        for j in range(1, A_max//i + 1):
            a[i * j] += 1

    ans = 0
    for i in A:
        if a[i] == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    resolve()

Buggy submission (verdict: Runtime Error):
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    A.sort()
    a = [0] * 10005
    A_max = A[-1]

    for i in A:
        for j in range(1, A_max//i + 1):
            a[i * j] += 1

    ans = 0
    for i in A:
        if a[i] == 1:
            ans += 1
    print(ans)

if __name__ == "__main__":
    resolve()
Problem p03455 (python)

Fixed submission:
a = list(map(int, input().split(' ')))
b = a[0] * a[1]
r = 'Even' if (b % 2 == 0) else 'Odd'
print(r)

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())
old_t = 0
old_x = 0
old_y = 0
for i in sys.stdin:
    a = list(map(int, i.split(' ')))
    t = a[0]
    x = a[1]
    y = a[2]
    d = abs(x - old_x) + abs(y-old_y)
    T = t - old_t
    if (T % 2 != d % 2):
        print('No')
        sys.exit(0)
    if (T <= d):
        print('No')
        sys.exit(0)
    old_t = t
    old_x = x
    old_y = y
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())
old_t = 0
old_x = 0
old_y = 0
for i in sys.stdin:
    a = list(map(int, i.split(' ')))
    t = a[0]
    x = a[1]
    y = a[2]
    if (a[1] > N or a[2] > N):
        print('No')
        sys.exit(0)
    if ((x + y) > t + 1):
        print('No')
        sys.exit(0)
    if (t % 2 != (x + y) % 2):
        print('No')
        sys.exit(0)
    if (abs(x-old_x) + abs(y-old_y) > (t-old_t)):
        print('No')
        sys.exit(0)
    else:
        old_t = t
        old_x = x
        old_y = y
print('Yes')
Problem p02582 (python)

Fixed submission:
x=list(input())
if x.count("R")==0:
  print(0)
elif x.count("R")==1:
  print(1)
elif x.count("R")==3:
  print(3)
else:
  if x[1]=="S":
    print(1)
  else:
    print(2)

Buggy submission (verdict: Runtime Error):
a,b,c=input()
if a="S":
  elif b="S":
    elif c="S":
      	print(0)
    else:
        print(1)
  else:
    elif c="S":
      print(1)
    else:
      print(2)
else:
  elif b="S":
    elif c="S":
      	print(1)
    else:
        print(1)
  else:
    elif c="S":
      print(2)
    else:
      print(3)
Problem p02885 (python)

Fixed submission:
a,b=map(int,input().split())
if a<2*b:
  print(0)
else:
  print(int(a-2*b))

Buggy submission (verdict: Runtime Error):
a,b=map(int,input())
if a<2*b:
  print(0)
else:
  print(a-2*b)
Problem p03067 (python)

Fixed submission:
a, b, c=map(int,input().split())
if a<=c<=b or b<=c<=a:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n=int(input())
s=list(input())
k=int(input())
s_k=s[k-1]
for i in range(n):
  if s[i]!=s_k:
    s[i]="*"
print("".join(s))
Problem p03071 (python)

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

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(map(int, input().split()))
m=0
for i in range(n):
  for j in range(i):
    if l[j]>l[i]:
      break
  else:
    m+=1
print(m)

Buggy submission (verdict: Runtime Error):
n=int(input())
l=list(input().split())
m=0
for i in range(n):
  for j in range(i):
    if l[j]>l[i]:
      break
  else:
    m+=1
print(m)
Problem p03076 (python)

Fixed submission:
x = [int(input()) for i in range(5)]
y=0
for i in x:
  if i%10==0:
    y+=i
  else:
    y+=(i+(10-(i%10)))
a=[]
for i in x:
  a.append(i%10)
if a.count(0)!=5:
  while 0 in a:
    a.remove(0)
  b=sorted(a)
  print(y-(10-b[0]))
else:
  print(y)

Buggy submission (verdict: Runtime Error):
x = [int(input()) for i in range(5)]
a=[]
for i in x:
  a.append(i%10)
while 0 in a:
  a.remove(0)
b=sorted(a)
y=0
for i in x:
  if i%10==0:
    y+=i
  else:
    y+=(i+(10-(i%10)))
print(y-(10-b[0]))
Problem p03109 (python)

Fixed submission:
a, b, c=map(int, input().split("/"))
if a>=2020:
  print("TBD")
elif a==2019 and b>=5:
  print("TBD")
else:
  print("Heisei")

Buggy submission (verdict: Runtime Error):
a, b, c=map(int, input().split(/))
if a>=2020:
  print("TBD")
elif a==2019 and b>=5:
  print("TBD")
else:
  print("Heisei")
Problem p03260 (python)

Fixed submission:
a, b=map(int, input().split())
if a%2==1 and b%2==1:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b=map(int, input())
if a%2==1 and b%2==1:
  print("Yes")
else:
  print("No")
Problem p03337 (python)

Fixed submission:
a, b=map(int, input().split())
d=a+b
e=a-b
f=a*b
print(max(d, e, f))

Buggy submission (verdict: Runtime Error):
a, b, c=map(int, input().split())
print(max((a+b), (a-b), (a*b)))
Problem p03455 (python)

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

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

Fixed submission:
l=list(map(int, input()))
print(l.count(1))

Buggy submission (verdict: Runtime Error):
l=list(map(int, input()))
print(l.count(1)
Problem p03573 (python)

Fixed submission:
a, b, c=map(int, input().split())
if a==b:
  print(c)
elif b==c:
  print(a)
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a, b, c=map(int, input().split())
if a==b:
  print(c)
elif b=c:
  print(a)
else:
  print(b)
Problem p03605 (python)

Fixed submission:
a, b=map(int,input())
if a==9 or b==9:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
a, b=int(input())
if a==9 or b==9:
  print("Yes")
else:
  print("No")
Problem p03737 (python)

Fixed submission:
l = input().split()
a = l[0].upper()
b = l[1].upper()
c = l[2].upper()
print(a[0]+b[0]+c[0])

Buggy submission (verdict: Runtime Error):
l = input().split()
a = l[0].upper()
b = l[1].upper()
c = l[2].upper()
print(a[0]+b[0]+c[2])
Problem p03759 (python)

Fixed submission:
a, b, c = map(int,input().split())
if b-a == c-b:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if b-a == c-b:
  print("YES")
else:
  plint("NO")
Problem p03998 (python)

Fixed submission:
a=list(input())
b=list(input())
c=list(input())
next=a.pop(0)
while True:
  if next=="a":
    if not a:
      print("A")
      break
    else:
      next=a.pop(0)
  elif next=="b":
    if not b:
      print("B")
      break
    else:
      next=b.pop(0)
  else :
    if not c:
      print("C")
      break
    else:
      next=c.pop(0)

Buggy submission (verdict: Runtime Error):
a=list(input())
b=list(input())
c=list(input())
next=a.pop(0)
while True:
  if next=="a":
    if not a:
      print("A")
      break
    else:
      next=a.pop(0)
  elif next=="b":
    if not b:
      print("B")
      break
    else:
      next=b.pop(0)
  else :
    if not b:
      print("C")
      break
    else:
      next=c.pop(0)
Problem p04043 (python)

Fixed submission:
List = input().split()
if List.count("5") == 2 and List.count("7") == 1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
n, l=map(int, input().split())
s=[input() for i in range(n)]
s.sort()
print("".join(s))
Problem p03195 (python)

Fixed submission:
import fractions
from functools import reduce

N = int(input())
a = [int(input()) for x in range(N)]

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

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

res = gcd(*a)
if res % 2 == 0:
    print("second")
else:
    print("first")

Buggy submission (verdict: Runtime Error):
import fraction
from functools import reduce

N = int(input())
a = [int(input()) for x in range(N)]

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

def gcd_list(numbers):
    return reduce(fraction.gcd, numbers)

res = gcd(*a)
if res % 2 == 0:
    print("second")
else:
    print("first")

Buggy submission (verdict: Runtime Error):
import math
from functools import reduce

N = int(input())
a = [int(input()) for x in range(N)]

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

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

res = gcd(*a)
if res % 2 == 0:
    print("second")
else:
    print("first")
Problem p03227 (python)

Fixed submission:
S = input()

if len(S) == 2:

    print(S)

elif len(S) == 3:

    print(S[::-1])

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

for k in range(K):

    if A % 2 != 0:
        
        if A > 1:
            
            A -= 1

    B += round(A/2)
    A -= round(A/2)

    if B % 2 != 0:

        if B > 1:
            
            B -= 1

    A += round(B/2)
    B -= round(B/2)

print(A, B)

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

for k in range(K):

    if A % 2 != 0 and A < 1:
            
        A -= 1

    B += round(A/2)
    A -= round(A/2)

    if B % 2 != 0 and if B < 1:
            
        B -= 1

    A += round(B/2)
    B -= round(B/2)

print(A, B)
Problem p03813 (python)

Fixed submission:
x = int(input())
print("ABC") if x < 1200 else print("ARC")

Buggy submission (verdict: Runtime Error):
x = int(input)
print("ABC") if x < 1200 else print("ARC")
Problem p02687 (python)

Fixed submission:
s = input()

if s == 'ABC':
        print('ARC')
else:
        print('ABC')

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

if s = 'ABC':
	print('ARC')
else:
	print('ABC')
Problem p04043 (python)

Fixed submission:
haiku = input().split()
five = haiku.count("5")
seven = haiku.count("7")
if five ==2 and seven ==1:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
haiku = input().split()
five = haiku.count("5")
sevent = haiku.count("7")
if five ==2 and seven ==1:
  print("YES")
else:
  print("NO")
Problem p02767 (python)

Fixed submission:
N = int(input())
X = list(map(int,input().split()))
Ans = 0
M = round(sum(X)/N)
for i in X:
    Ans +=(i-M)**2
print(Ans)

Buggy submission (verdict: Runtime Error):
N = int(iput())
X = list(map(int,input().split()))
Ans = 0
M = Rn (sum(X)/N)
for i in X:
  Ans +=(i-M)**2
print(Ans)
Problem p02783 (python)

Fixed submission:
import math

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

Buggy submission (verdict: Runtime Error):
import math
H,A = [int(x) for x in input().spit()] print(math.ceil(A/B))

Buggy submission (verdict: Runtime Error):
import math H,A = [int(c) for c in input().spit()] print(math.ceil(A/B))

Buggy submission (verdict: Runtime Error):
import math A,B = [int(c) for o in input().spit()] print(math.ceil(A/B))

Buggy submission (verdict: Runtime Error):
import math A,B = [int(c) for o in input().spit()]
print(math.ceil(A/B))

Buggy submission (verdict: Runtime Error):
import math
A,B = [int(c) for o in input().spit()]
print(math.ceil(A/B))
Problem p02784 (python)

Fixed submission:
H,N=[int(x)for x in input().split()]
attack=[int(x) for x in input().split()]
print("Yes"if H- sum(attack)<= 0 else "No")

Buggy submission (verdict: Runtime Error):
H,N=[int(x)for x in input().split()] attack=[int(x) for x in input().split()]
print("Yes"if H- sum(attack)<= 0 else "No")
Problem p02812 (python)

Fixed submission:
N = int(input())
S = str(input())
print(S.count("ABC"))

Buggy submission (verdict: Runtime Error):
Num=int(Input())
Str=str(Input())
print(str.count("ABC"))

Buggy submission (verdict: Runtime Error):
put=int(Input())
str=str(Intput())
print(str.count("ABC"))
Problem p02639 (python)

Fixed submission:
X = list(map(int, input().split()))
i = 0

for i in range(0,5):
    if X[i] == 0:
        print(i+1)

Buggy submission (verdict: Runtime Error):
X = list(map(int, input().split()))

for int i range 5:
    if X[i] == 0:
        print(i)
Problem p02687 (python)

Fixed submission:
S = str(input())

if S == 'ABC':
    print("ARC")
else:
    print("ABC")

Buggy submission (verdict: Runtime Error):
S = str(input())

if S == ABC:
  print("ARC")
else:
  print("ABC")
Problem p02718 (python)

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

A.sort(reverse=True)

if A[m-1] >= (sum(A)/(4*m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m] >= (sum(A) / (4 * m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m+1] >= (sum(A) // (4 * m)):
    print("Yes")
else:
    print("No")

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

A.sort(reverse=True)

if A[m] >= (sum(A) // (4 * m)):
    print("Yes")
else:
    print("No")
Problem p02765 (python)

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

if n < 10:
    a = 100 * (10 - n)
    b = r + a
    if b >=0:
        print(b)
    else:
        print(0)
else:
    print(r)

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

def base10to(n, k):
    if (int(n/k)):
        return base10to(int(n/k), k) + str(n%k)
    return str(n%k)

a = base10to(n, k)
print(len(a))
Problem p02767 (python)

Fixed submission:
n = int(input())
x = list(map(int, input().split()))
p = round(sum(x) / len(x))
a = 0

for i in range(n):
    a += ((x[i]-p)**2)
print((a))

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

for i in range(n):
    a = list((x[n]-n)**2) 

print(sum(a))
Problem p03471 (python)

Fixed submission:
N, Y = map(int, input().split())

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y)==Y:
            print("{} {} {}".format(x, y,(N-x-y)))
            exit()
print("-1 "+"-1 "+"-1")

Buggy submission (verdict: Runtime Error):
N, Y = map(int, input().split())

for x in range(N+1):
    for y in range(N-x+1):
        if 10000*x + 5000*y + 1000*(N-x-y)==Y:
            print(x+""+y+""+(N-x-y))
            exit()
print("-1 "+"-1 "+"-1")
Problem p02576 (python)

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

if n % x == 0:
  ans = (n // x) * t
else:
  ans = (n // x + 1) * t

print(ans)

Buggy submission (verdict: Runtime Error):
n, x, t = map(int, input())

if n % t == 0:
  ans = (n // x) * t
else:
  ans = (n // x + 1) * t

print(ans)
Problem p02601 (python)

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

for i in range(k):
  if N[1] <= N[0]:
    N[1] = N[1] * 2
  elif N[2] <= N[1]:
    N[2] = N[2] * 2
  
if N[1] > N[0] and N[2] > N[1]:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = list(map(int,input()))
k = int(input())

for i in range(k):
  if N[1] <= N[0]:
    N[1] = N[1] * 2
  elif N[2] <= N[0]:
    N[2] = N[2] * 2
  
if N[1] >= N[0] and N[2] >= N[0]:
  print("Yes")
else:
  print("No")
Problem p02602 (python)

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

for i in range(n - k): #iはスタート地点
    old = A[i] #Aのj番目の要素をかける
    new = A[i + k]
    
    if old < new:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
import functools
import operator

n, k = map(int, input().split())
A = list(map(int, input().split()))

old_score = 1
new_score = 1

for i in range(n - k + 1): #iはスタート地点
    old_score = new_score
    new_score = 1
    
    list_ = A[i, i + k] #Aのj番目の要素をかける
    new_score = functools.reduce(operator.mul, list_)

    if i != 0 and old_score < new_score:
        print("Yes")
    elif i != 0 and old_score >= new_score:    
        print("No")
Problem p02658 (python)

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

ans = 1
if 0 in A:
  print("0")
else:
  for i in A:
    ans = ans * i
    if ans > 10 ** 18:
      print("-1")
      break
    else:
      continue
  else:
    print(ans)

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

ans = 1
for i in A:
  ans = ans * i
  if ans > 10 ** 18:
	  print("-1")
      break
  else:
    continue
else:
  print(ans)
Problem p02675 (python)

Fixed submission:
n = int(input());
a = n % 10

if a == 2 or a ==4 or a == 5 or a == 7 or a == 9:
  print("hon")
elif a ==0 or a == 1 or a == 6 or a == 8:
  print("pon")
else:
  print("bon")

Buggy submission (verdict: Runtime Error):
n = int(input());
a = n % 10

if a == 2 or a ==4 or a == 5 or 7 a == 9:
  print("hon")
elif a ==0 or a == 1 or a == 6 or a == 8:
  print("pon")
else:
  print("bon")
Problem p02677 (python)

Fixed submission:
import math

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

kaku = math.pi / 360 * abs(60 * h - 11 * m)

#yogen
ans = a ** 2 + b ** 2 - 2 * math.cos(kaku) * a * b

print(ans ** (1 / 2))

Buggy submission (verdict: Runtime Error):
import math

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

kaku = math.pi / 360 * abs(60 * h - 11 * M)

#yogen
ans = a ** 2 + b ** 2 - 2 * math.cos(kaku) * a * b

print(ans ** (1 /2))
Problem p02713 (python)

Fixed submission:
from math import gcd
 
K = int(input());
sum = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      sum += gcd(gcd(a,b),c);

print(sum)

Buggy submission (verdict: Runtime Error):
from math import gcd
 
K = int(input());
gcd = 0;

for a in range(1,K+1):
  for b in range(1,K+1):
    for c in range(1,K+1):
      gcd += gcd(gcd(a,b),c);

print(gcd)

Buggy submission (verdict: Runtime Error):
import math

K = int(input());
gcd = o;

for a in range(K):
  aa = a + 1 ;
  
  for b in range(K):
    bb = b + 1;
    
    for c in range(K):
      cc = c + 1;
      gcd += math.gcd(aa,bb,cc);
        
print(gcd)
Problem p02718 (python)

Fixed submission:
N,M = (int(a) for a in input().split());
A = input();

A = A.split();


B = [int(s) for s in A];

sum = sum(B)

line = sum/4/M
point = 0;
length = len(B);

for i in range(length):
    if B[i] >= line:
        point += 1;
    else:
        pass;
    
if point >= M:
    print("Yes");
else:
    print("No");

Buggy submission (verdict: Runtime Error):
S = input();
 
if S[2]==S[3] and S[4]==S[5]:
  print("Yes");
else:
  print("No");
Problem p02731 (python)

Fixed submission:
l = int(input());

ans = (l / 3) ** 3;

print(ans);

Buggy submission (verdict: Runtime Error):
l = int(input());

ans = (l / 3) ^ 3;

print(ans);

Buggy submission (verdict: Runtime Error):
l = input();

ans = (l / 3) ^ 3;

print(ans);
Problem p02755 (python)

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

for x in range(1,1001):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
    ans = x;
    break;
  elif x == 100:
    ans = -1;
  else:
    pass;
  
print(ans);

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

for x in range(1,101):
  tax_8 = int(x * 0.08);
  tax_10= int(x * 0.1);
  if tax_8 == a and tax_10 == b:
  	ans = x;
    break;
  elif x == 101:
    ans = -1;
  else:
    pass;
  
print(ans);
Problem p02783 (python)

Fixed submission:
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);

Buggy submission (verdict: Runtime Error):
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);
Problem p02784 (python)

Fixed submission:
h, n = input().split();
h = int(h);
n = int(n);

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

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

Buggy submission (verdict: Runtime Error):
h, n = input().split;
h = int(h);
n = int(n);

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

if sum(A) > h:
  print("No");
else:
  print("Yes");
Problem p02802 (python)

Fixed submission:
n,m = map(int,input().split())
#ac,wa列を作成（pi問題がACならac[i]がTRUE、AC,WAに問わずwa[i]はwaの数）
ac, wa=[False]*n,[0]*n
for i in range(m):
  p,s = input().split()
  p=int(p)
  if s=='AC':
    ac[p-1]=True
  elif (s=='WA') and (ac[p-1]==False):
    wa[p-1]+=1

penalty, clear=0,0
for i,tf in enumerate(ac): #iはインデックス、tfはac[i]
  if tf:
    penalty += wa[i] #piがACされているとき、ペナルティ値を増やす
    clear += 1
print(clear, penalty)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
#ac,wa列を作成（pi問題がACならac[i]がTRUE、AC,WAに問わずwa[i]はwaの数）
ac, wa=[False]*n,[0]*n
for i in range(m):
  p,s = input().split()
  p=int(p)
  if s=='AC':
    ac[p-1]=True
  elif (s=='WA') and (ac[p-1]==False):
    wa[p-1]+=1

penalty, clear=0,0
for i,tf in enumerate(ac): #iはインデックス、tfはac[i]
  if tf:
    penalty += wa[i] #piがACされているとき、ペナルティ値を増やす
    clear += 1
print(clear penalty)

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

A = []*m;
B = []*m;

for i in range(m):
  a, b = input().split();
  A[i] = int(a);
  B[i] = b;
  
#ACの数
AC_list = list(set(A));

AC_count = len(AC_list);

#WAの数
WA_count = 0;

for j in AC_list:
  indexes = [i for i, x in enumerate(A) if x == j];
  for k in indexes:
    if B[k] == "WA":
      WA_count += 1;
      continue;
    else:
      break;
      
print(AC_count, WA_count);

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

A = []*m;
B = []*m;

for i in range(m):
  a, b = input().split();
  A[i] = int(a));
  B[i] = b;
  
#ACの数
AC_list = list(set(A));

AC_count = len(AC_list);

#WAの数
WA_count = 0;

for j in AC_list:
  indexes = [i for i, x in enumerate(A) if x == j];
  for k in indexes:
    if B[k] == "WA":
      WA_count += 1;
      continue;
    else:
      break;
      
print(AC_count, WA_count);

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split());
A = [];
B = [];

for i in range(m):
  a, b = input().split();
  a = int(a);
  A.append(a);
  B.append(b);

AC_count = 0;
WA_count = 0;
AC_list = [];

#AC_listの作成
for i in range(m):
  if B[i] == "AC":
    if A[i] not in AC_list: 
      AC_list.append(A[i]);

AC_count = len(AC_list);

#WA_countの作成
for j in range(m):
  if A[i] in AC_list:
    if B[i] == "WA":
      WA_count += 1;

 print(AC_count, WA_count);