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

Fixed submission:
a, b = input().split()
if a == "H"and b == "H":
    print("H")
elif a == "H" and b == "D":
    print("D")
elif a == "D" and b == "D":
    print("H")
else:
    print("D")

Buggy submission (verdict: Runtime Error):
a,b= input().split("")
if a=="H"and b=="H":
    print("H")
elif a=="H" and b=="D":
    print("D")
elif a=="D" and b=="D":
    print("H")
else:
    print("D")
Problem p03943 (python)

Fixed submission:
a, b, c = map(int, input().split())
ab = a+b
bc = b+c
ca = c+a
flg = False
if ab == c:
    flg = True
if bc == a:
    flg = True
if ca == b:
    flg = True

if flg == True:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
ab = a+b
bc = b+c
ca = c+a
flg = False
if ab == c:
    flg = True
if bc == a:
    flg = True
if ca == b:
    flg = True

if flg = True:
    print("Yes")
else:
    print("No")
Problem p04030 (python)

Fixed submission:
s = input()
# s = "01B0"
# print(s[0])

ans = []
for key in range(len(s)):

    if s[key] == "0" or s[key] == "1":
        ans.append(s[key])
    if s[key] == "B" and len(ans) > 0:
        ans.pop(-1)
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = input()
# s = "01B0"
# print(s[0])

ans = []
for key in range(len(s)):

    if s[key] == "0" or s[key] == "1":
        ans.append(s[key])
    if s[key] == "B":
        ans.pop(-1)
print("".join(ans))
Problem p04043 (python)

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
N,L = map(int,input().split())
s =[]
for i in range(N):
    s.append(input())
s.sort()
result = ''.join(s)
print(result)

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
S = []
for i in range(N):
    line = input()
    S.append(line)
S.sort()
print("".join(S))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = []
for i in range(N):
    line = input()
    s.append(line)
s.sort()
ans="".join(s)
print(ans)

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = []
for i in range(N):
    line = input()
    s.append(line)
s.sort()
print("".join(s))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = []
for i in range(N):
    line = input()
    s.append(line)
s.sort()
print("".join(s))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = []
for i in range(N):
    line = input()
    print(line)
    s.append(line)
s.sort()
print("".join(s))

Buggy submission (verdict: Runtime Error):
N,L=map(int,input().split())
s =[]
for i in range(0,L):
    s.append(str(input()))
s.sort()
ans = ""
for word in s:
    ans = ans+word
print(ans)

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

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

# A = 5
# B = 7
# C = 5
arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")

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

arr = [A, B, C]
fives = 0
sevens = 0

for num in arr:
    if num == 5:
        fives += 1
    if num == 7:
        sevens += 1

if fives == 2 and sevens == 1:
    print("YES")
else:
    print("NO")
Problem p04044 (python)

Fixed submission:
N, L = map(int, input().split())
S = []
for i in range(N):
    line = input()
    S.append(line)
S.sort()
print("".join(S))

Buggy submission (verdict: Runtime Error):
N, L = map(int, input().split())
s = []
for i in range(L):
    line = input()
    print(line)
    s.append(line)
s.sort()
print("".join(s))
Problem p03030 (python)

Fixed submission:
N = int(input())
rest = [list(input().split()) for n in range(N)]

for n in range(N):
    rest[n][1] = int(rest[n][1])
    rest[n].append(n + 1)
    
rest.sort(key = lambda x: x[1], reverse = True)
rest.sort(key=lambda x: x[0], reverse=False)


for n in range(N):
    print(rest[n][2])

Buggy submission (verdict: Runtime Error):
import pandas as pd

N = int(input())
rest = [list(input().split()) for n in range(N)]

df_rest = pd.DataFrame(rest)
df_rest[1] = df_rest[1].apply(int)
df_rest = df_rest.sort_values([0,1], ascending = [True, False])

for x in df_rest.index:
    print(x + 1)
Problem p03076 (python)

Fixed submission:
a = []
for i in range(5):
    a.append(int(input()))

b = []
c = []
for j in range(5):
    if a[j] % 10 == 0:
        c.append(10)
        b.append(a[j]-10)
    else:
        c.append(a[j] % 10)
        b.append(a[j] - c[j])
        

b_sum = sum(b)
c_min = min(c)
c_sum = c_min + 4*10

print(b_sum + c_sum)

Buggy submission (verdict: Runtime Error):
a = []
for i in range(5):
    a.append(int(input()))
 
b = []
c = []
for j in range(5):
    if a[j] % 10 == 0:
        c.append(10)
        b.append(a[j]-10)
    else:
      　num = a[j]%10
        c.append(num)
        b.append(a[j] - c[j])
        
 
b_sum = sum(b)
c_min = min(c)
c_sum = c_min + 4*10
 
print(b_sum + c_sum)
Problem p03087 (python)

Fixed submission:
n,q = map(int,input().split())
s = input()
pref = [0]
for i in range(1,n):
  if s[i-1:i+1] == "AC": 
      pref.append(pref[-1]+1)
  else: 
      pref.append(pref[-1])
for i in range(q):
    l,r = map(int,input().split())
    print(pref[r-1]-pref[l-1])

Buggy submission (verdict: Runtime Error):
inr = lambda: list(map(int, input().split()))
inn = lambda: input()
 
N,Q = inr()
S = inn()


cou  = 0
cou_list = []
for s in S:
    if s == "C":
        if flag == 1:
            cou += 1
            flag = 0
    elif s == "A":
        flag = 1
    else:
        flag = 0
    cou_list.append(cou)

for q in range(Q):
    l,r = inr()
    bubun = cou_list[r-1] - cou_list[l-1]
    print(bubun)
Problem p03101 (python)

Fixed submission:
H,W = map(int, input().split())
h,w = map(int, input().split())
print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
ni = lambda: int(ns())
na = lambda: list(map(int, input().split()))
ns = lambda: input().rstrip()  # ignore trailing spaces
 
n, m = na()
ab = []
for i in range(n):
    ab.append(na())
ab.sort(key=lambda x: x[0])
 
rem = m
ans = 0
for v in ab:
    buy = min(rem, v[1])
    ans += buy * v[0]
    rem -= buy
print(ans)
Problem p03145 (python)

Fixed submission:
ab, bc, ca = map(int, input().split())

S = int(ab * bc / 2)
print(S)

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

num = 25 - D
s = "Christmas"
s += " Eve" * num

print(s)
Problem p03206 (python)

Fixed submission:
D = int(input())

dic = {25: "Christmas", 24: "Christmas Eve", 23: "Christmas Eve Eve",
22: "Christmas Eve Eve Eve"}

print(dic[D])

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

num = 25 - D
s = "Christmas"

for i in num:
    s += " Eve"

print(s)
Problem p03262 (python)

Fixed submission:
from functools import reduce

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

if X not in x_list:
    x_list.append(X)
    x_list.sort()
    N += 1    

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

if N >= 3:
    space = [abs(x_list[i + 1] - x_list[i]) for i in range(N - 1)]
    print(reduce(gcd, space))
elif N == 2:
    space = x_list[1] - x_list[0]
    print(space)
elif N == 1:
    space = x_list[0]
    print(space)

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

N, X = map(int, input().split())
x_list = list(map(int, input().split()))

if X not in x_list:
    x_list.append(X).sort()
    N += 1    

def gcd(x, y):
    if y == 0:
        return x
    else:
        return gcd(y, x % y)

if N >= 3:
    space = [abs(x_list[i + 1] - x_list[i]) for i in range(N - 1)]
    print(reduce(gcd, space))
elif N == 2:
    space = x_list[1] - x_list[0]
    print(space)
elif N == 1:
    space = x_list[0]
    print(space)
Problem p03274 (python)

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

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

a = len(minus) - 1
b = len(plus) - 1

ans = []
for i in range(max(0, K - b), min(a, K) + 1):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

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

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - (len(plus) - 1)), min(len(minus) + 1, K)):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

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

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - (len(plus) - 1)), min(len(minus) + 1, K)):
    print(i, K-i)
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))

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

minus = [0]
plus = [0]
for x in X:
    if x < 0:
        minus.append(abs(x))
    elif x == 0:
        K -= 1
    else:
        plus.append(x)

#負の数の方を絶対値に基づき並べなおす
minus.sort()

ans = []
for i in range(max(0, K - len(plus), min(len(minus), K))):
    ans.append(min(minus[i] * 2 + plus[K - i], minus[i] + plus[K - i] * 2))

if len(X) == 1:
    ans.append(X[0])

print(min(ans))
Problem p03282 (python)

Fixed submission:
"""
Sの文字列、最初が何かに依存しそう
"""


S = input()
K = int(input())

if S[0] == "1":
    len_one = 0
    flag = 0
    for s in S:
        if s == "1" and flag == 0:
            len_one += 1
        elif flag == 0:
            save_num = s
            flag = 1
        else:
            flag = 1
    if K <= len_one:
        ans = 1
    else:
        ans = int(save_num)

else:
    ans = int(S[0])

print(ans)

Buggy submission (verdict: Runtime Error):
"""
Sの文字列、最初が何かに依存しそう
"""


S = input()
K = int(input())

if S[0] == "1":
    len_one = 0
    for s in S:
        if s == 1 and flag == 0:
            len_one += 1
        else:
            flag = 0
    
    if K <= len_one:
        ans = 1
    else:
        ans = S[1]

else:
    ans = S[0]

print(ans)
Problem p03059 (python)

Fixed submission:
a,b,t=map(int,input().split())
print((t//a)*b)

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):

    xright.append(math.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(n):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(result)
Problem p03061 (python)

Fixed submission:
import fractions
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(fractions.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(fractions.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=fractions.gcd(left[i-1],xright[n-i-2])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(math.gcd(xright[n-i-2],lst[i]))

print(xright,left)
#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=math.gcd(left[i-1],xright[n-i-2])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):
    xright.append(math.gcd(xright[n-i-2],lst[i]))

print(xright,left)
#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(1,n-1):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(max(result,xright[n-2],left[n-2]))

Buggy submission (verdict: Runtime Error):
import math
n=int(input())
lst=list(map(int,input().split()))
xlst=list(reversed(lst))
#1~5と6のgcdは1~6のgcd
#i番目の左側と右側のgcdを求める
#left[i-1]はlstのi番目までのgcd
#xright[i]はlstのnからi-
#lstのi+1番目は右から見たらn-i+1番目



left=[lst[0]]
xright=[lst[n-1]]
for i in range(1,len(lst)):
    left.append(math.gcd(left[i-1],lst[i]))

for i in reversed(range(0,len(lst)-1)):

    xright.append(math.gcd(xright[n-i-2],lst[i]))


#i-1番目までの左からのgcdはleft[i-2]
#i＋1番目以上のgcdは right[i+2]
result=1
for i in range(n):
    a=math.gcd(left[i-1],xright[i-1])
    if a>result:
        result=a
print(result)
Problem p03240 (python)

Fixed submission:
n=int(input())
l=[[]]*n
for i in range(n):
    l[i]=list(map(int,input().split()))
lst=sorted(l,key=lambda x:-x[2])
flag=False

for i in range(0,101):#i=X
    if flag:
        break
    for j in range(0,101):#j=Y
        if flag:
            break
        tmp=lst[0][2]+abs(lst[0][0]-i)+abs(lst[0][1]-j)
        for k in range(n):
            if lst[k][2]!=0:
            #print(k,'ループ目')
                sum=abs(lst[k][0]-i)+abs(lst[k][1]-j)
                H=lst[k][2]+sum
                if tmp!=H :
                    break
                a,b,c=i,j,H
                if k==n-1:
                    flag=True
                    print(i,j,H,)
                    break
            
            else:
                
                if lst[k][2]!=max(c-abs(a-lst[k][0])-abs(b-lst[k][1]),0):
                    #print(c,abs(a-lst[k][0]),abs(b-lst[k][1]))
                    break
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break

Buggy submission (verdict: Runtime Error):
n=int(input())
l=[[]]*n
for i in range(n):
    l[i]=list(map(int,input().split()))
lst=sorted(l,key=lambda x:-x[2])
flag=False

for i in range(0,101):#i=X
    if flag:
        break
    for j in range(0,101):#j=Y
        if flag:
            break
        tmp=lst[0][2]+abs(lst[0][0]-i)+abs(lst[0][1]-j)
        for k in range(n):
            if lst[k][2]!=0:
            #print(k,'ループ目')
                sum=abs(lst[k][0]-i)+abs(lst[k][1]-j)
                H=lst[k][2]+sum
                if tmp!=H :
                    break
                a,b,c=i,j,H
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break
            else:
                if lst[0][2]!=max(c-abs(a-lst[k][1])-abs(b-lst[k][2])):
                    break
                if k==n-1:
                    flag=True
                    print(i,j,H)
                    break
Problem p03485 (python)

Fixed submission:
a, b = map(int, input().split())
print( int((a + b + 2 - 1) / 2) )

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

sdash = "".join(sorted(s))
tdash = "".join(sorted(t, reverse = True))

print("Yes" if sdash < tdash else "No")

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

sdash = "".join(sorted(s))
tdash = "".join(sorted(s, reverse = True))

print("Yes" if sdash < tdash else "No")
Problem p02953 (python)

Fixed submission:
n = int(input())
h = [int(x) for x in input().split()]

ans = True
for i in range(n-1, 0, -1):
  dis = h[i] - h[i-1]
  if dis >= 0:
    continue
  elif dis == -1:
    h[i-1] -= 1
    continue
  else:
    ans = False
    break

if ans:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = int(input())
h = [int(x) for x in input().split()]

ans = True
for i in range(n-1, 0, -1):
  dis = h[i] - h[i-1]
  if dis >= 0:
    continue
  elif dis == -1:
    h[i+1] -= 1
    continue
  else:
    ans = False
    break

if ans:
  print('Yes')
else:
  print('No')
Problem p03037 (python)

Fixed submission:
# 解説を見ての解答
from sys import stdin

n, m = map(int, stdin.readline().rstrip().split())
lr = [list(map(int, stdin.readline().rstrip().split())) for i in range(m)]

l, r = lr[0][0], lr[0][1]
for i in range(m):
    l = max(l, lr[i][0])
    r = min(r, lr[i][1])

print(max(0,r-l+1))

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

seki = set(list(range(1,N+1)))
for i in range(M):
    l, r = map(int, input().split())
    seki &= set(list(range(l, r+1)))
print(len(seki))
Problem p03145 (python)

Fixed submission:
ab, bc, ca = map(int, input().split())
print(int(bc*ab/2))

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

count = 0
prev = 0

for h in hn:
    count += max(0, h-prev)
    prev = h

print(count)
Problem p03289 (python)

Fixed submission:
from collections import Counter
import sys

s = input()
counter = Counter(s[2:-1])

if s[0] == 'A':
    s = s.lstrip('A')
else:
    print('WA')
    sys.exit(0)

if counter['C'] == 1:
    s = s.replace('C', '')
else:
    print('WA')
    sys.exit(0)

if s.islower():
    print('AC')
else:
    print('WA')

Buggy submission (verdict: Runtime Error):
from collections import Counter
import sys

s = input()
counter = Counter(s[2:-1])

if s[0] == 'A':
    s = s.lstrip('A')
else:
    print('WA')
    sys.exit(1)

if counter['C'] == 1:
    s = s.replace('C', '')
else:
    print('WA')
    sys.exit(1)

if s.islower():
    print('AC')
else:
    print('WA')
Problem p03293 (python)

Fixed submission:
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        break

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys

s = list(input())
t = list(input())

for i in range(len(s)):    
    if s == t:
        print("Yes")
        sys.exit(1)

    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

if s == t:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import sys

s = list(input())
t = list(input())

for i in range(len(s)):
    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

    if s == t:
        print('Yes')
        sys.exit(1)

print('No')

Buggy submission (verdict: Runtime Error):
import sys

s = list(input())
t = list(input())

for i in range(len(s)):
    tmp = s.pop(len(s)-1)
    s.insert(0, tmp)

    if s == t:
        print("Yes")
        sys.exit(1)

print("No")

Buggy submission (verdict: Runtime Error):
aaaaaaaaaaaaaaab
aaaaaaaaaaaaaaab
Problem p03323 (python)

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

if A > 8 or  B > 8:
    print(":(")
else:
    print("Yay!")

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

if A > 8 or  B > 8:
    print(":(")
else:
    print("Yay!")
Problem p03086 (python)

Fixed submission:
S=list(input())
li = ['A','T','G','C']
ans=0
leng=0
for i in range(len(S)):
    if S[i] in li:
        leng+=1
    else:
        leng=0
    if leng>ans:
        ans=leng
print(ans)

Buggy submission (verdict: Runtime Error):
S=list(input())
li = ['A','T','G','C']
maxl=0
ans=0
for i in range(len(S)):
    if S[i] in li:
        leng+=1
    else:
        if leng>maxl:
            maxl=leng
        leng=0
print(maxl)
Problem p03106 (python)

Fixed submission:
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B])+1)):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
ans.sort(reverse=True)
print(ans[K-1])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[1]
for i in range(2,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
print(ans[K-1])

Buggy submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
ans=[]
for i in range(1,int(max([A,B]))):
        if A%i== 0 and B%i == 0:
            ans.append(i)
print(ans[K-1])
Problem p03109 (python)

Fixed submission:
S = input().split("/")
x = "".join(S)
if int(x)<=20190430:
    print("Heisei")
else:
        print("TBD")

Buggy submission (verdict: Runtime Error):
S = map(int,input().split("/"))
if S<=20190430:
    print("Heisei")
    elif:
        print("TBD")
Problem p03110 (python)

Fixed submission:
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0])*380000

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0]*380000)

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=int(u[i][0])
    else:
        Y+=int(u[i][0])*380000

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if i[i][1]=="JPY":
        Y+=u[i][0]
    else:
        Y+=u[i][0]*380000

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in u:
    if i[i][0]=="JPY":
        Y+=u[i][1]
    else:
        Y+=u[i][1]*380000

print(Y)

Buggy submission (verdict: Runtime Error):
N = int(input())
u = [list(map(int, input().split())) for _ in range(N)]

Y=0
for i in u:
    if i[i,0]=="JPY":
        Y+=u[i,1]
    else:
        Y+=u[i,1]*380000

print(Y)
Problem p03145 (python)

Fixed submission:
li=list(map(int, input().split()))
print(int(li[0]*li[1]*1/2))

Buggy submission (verdict: Runtime Error):
li=int(input().split())
print(li[0]*li[1]*1/2)