Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=list(input())
x=0
ans=0
for i in range(n):
  if s[i]=='I':
    x+=1
  else s[i]=='D':
    x-=1
  ans=max(ans,x)
print(ans)

Fixed submission:
n=int(input())
s=list(input())
x=0
ans=0
for i in range(n):
  if s[i]=='I':
    x+=1
  else:
    x-=1
  ans=max(ans,x)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
k,s =map(int,input().split())
cnt = 0
for x in range(0,s+1):
  if x>k:
    break
  for y in range(0,s+1-x):
    if y>k:
      break
    z = s-x-y
    if x<=k and y<=k and z <=k:
      cnt += 1
print(cnt)

Fixed submission:
k,s =map(int,input().split())
cnt = 0
for x in range(0,s+1):
  for y in range(0,s+1-x):
    z = s-x-y
    if x<=k and y<=k and z <=k:
      cnt += 1
print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
k,s =map(int,input().split())
cnt = 0
for x in range(0,s+1):
  for y in range(0,s+1-x):
    z = s-x-y
    if x<=k and y<=k and z <=k:
      cnt += 1
print(cnt)

Fixed submission:
k,s =map(int,input().split())
cnt = 0
for x in range(0,s+1):
  for y in range(0,s+1-x):
    z = s-x-y
    if x<=k and y<=k and z <=k:
      cnt += 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

print(A*B)

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

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

print(str(A*B))

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

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

print(A*B)

Fixed submission:
a,b=map(int,input().split())
print(a*b)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())

A=list(map(int,input().split()))
ans=A[0]
for cnt in range(N-1):
    ans = ans * A[cnt+1]

if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)

Fixed submission:
N=int(input())

A=list(map(int,input().split()))
ans=A[0]

if 0 in A:
    print(0)
    exit()

for cnt in range(N-1):
    ans = ans * A[cnt+1]
    if ans > 1000000000000000000:
        break
    elif ans == 0:
        break
if ans > 1000000000000000000:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())
valSum = 0

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum += math.gcd(math.gcd(A,B),C)

print(valSum)



Fixed submission:
from math import gcd

K = int(input())
valSum = 0

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum += gcd(gcd(A,B),C)

print(valSum)

Buggy python submission (verdict: Time Limit Exceeded):
K = int(input())
valSum = 0

def origcd(a,b):
    if b == 0:
        return a
    return origcd(b, a % b)

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum = origcd(origcd(A,B),C) + valSum

print(valSum)



Fixed submission:
from math import gcd

K = int(input())
valSum = 0

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum += gcd(gcd(A,B),C)

print(valSum)

Buggy python submission (verdict: Time Limit Exceeded):
import math

K = int(input())
valSum = 0

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum = math.gcd(math.gcd(A,B),C) + valSum

print(valSum)

Fixed submission:
from math import gcd

K = int(input())
valSum = 0

for A in range(1,K+1):
    for B in range(1,K+1):
        for C in range(1,K+1):
            valSum += gcd(gcd(A,B),C)

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

sclist = []
for count in range(M):
    d = list(map(int,input().split()))
    sclist.append(d)

flag = False;
for count in range(10**(N-1),10**(N)):
    flag = False
    for count1 in range(M):
        s = sclist[count1][0]
        c = sclist[count1][1]
        if str(count)[s-1] == str(c):
            flag = True
        else:
            flag = False
            break
    if flag == True:
        print(count)
        break

if flag == False and M != 0:
    print(-1)
elif flag == False and M == 0:
    print(10**(N-1))




Fixed submission:
N= int(input())

count = 0

if N % 2 == 0:
    print(int(N/2))
else:
    print(int(N/2) + 1)

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

sclist = []
for count in range(M):
    d = list(map(int,input().split()))
    sclist.append(d)

flag = False;
for count in range(10**(N-1),10**(N)):
    flag = False
    for count1 in range(M):
        s = sclist[count1][0]
        c = sclist[count1][1]
        if str(count)[s-1] == str(c):
            flag = True
        else:
            flag = False
            break
    if flag == True:
        print(count)
        break

if flag == False and M != 0:
    print(-1)
elif flag == False and M == 0:
    print((N-1)** 10)




Fixed submission:
N= int(input())

count = 0

if N % 2 == 0:
    print(int(N/2))
else:
    print(int(N/2) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

LL = []
for count in range(N):
    LL.append(str(input()))
LLCount = []
for count in range(N):
    LLCount.append(LL.count(LL[count]))

LLS = []
ss = max(LLCount)

for count in range(N):
    if LLCount[count] == ss:
        LLS.append(LL[count])

ans = list(dict.fromkeys(LLS))
ans.sort()
for aa in ans:
    print(aa)


Fixed submission:
N= int(input())

dict = {}
for count in range(N):
    tcount = 0
    S= str(input())
    
    if S in dict.keys():
        tcount = dict[S] + 1
        dict.pop(S)
        dict[S] = tcount
    else:
        dict[S] = 1

maxval = max(dict.values())

keys = [k for k, val in dict.items() if val == maxval]
keys.sort()

for count in range(len(keys)):
    print(keys[count])
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

A.sort()
flag = False
for count in range(0,len(A-1)):
    if A[count] == A[count+1]:
        flag = True
        break

if flag == False:
    print("YES")
else:
    print("NO")

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

A.sort()
flag = False
for count in range(0,len(A)-1):
    if A[count] == A[count+1]:
        flag = True
        break

if flag == False:
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):

input = list(map(int, input().split()))
N = input[0]
M = input[1]

if iN == M:
    print("Yes")
else:
    print("No")

Fixed submission:

input = list(map(int, input().split()))
N = input[0]
M = input[1]

if N == M:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):

input = list(map(int, input().split()))
A = input[0]
B = input[1]
output = []
 
output.append(str(B) * A)

output.append(str(A) * B)

output.sort

print(output[0])


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

ansA = ""
ansB = ""
for countA in range(B):
    ansA = ansA + str(A)
for countB in range(A):
    ansB = ansB + str(B)

list = [str(ansA),str(ansB)]
list.sort()

print(list[0])
Buggy python submission (verdict: Runtime Error):
N,M= map(int,input().split())

tempP = ""
ac = []
wa = []

for count in range(N):
    ac.append(0)
    wa.append(0)

for count in range(M):
    P,S = input().split()
    P = int(P)
    P -= 1
    
    if ac[P] == 0:
        if S == "AC":
            ac[P] = 1
        else:
            wa[P] +=1



a = 0
b = 0
 
for i in range(n):
    if ac[i] == 1:
        a += 1
        b += wa[i]
 
print(*[a, b])

    

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

tempP = ""
ac = []
wa = []

for count in range(N):
    ac.append(0)
    wa.append(0)

for count in range(M):
    P,S = input().split()
    P = int(P)
    P -= 1
    
    if ac[P] == 0:
        if S == "AC":
            ac[P] = 1
        else:
            wa[P] +=1



a = 0
b = 0
 
for i in range(N):
    if ac[i] == 1:
        a += 1
        b += wa[i]
 
print(*[a, b])

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

tempP = ""
ac = []
wa = []

for count in range(M):
    ac.append(0)
    wa.append(0)

for count in range(M):
    P,S = input().split()
    P = int(P)
    P -= 1
    
    if ac[P] == 0:
        if S == "AC":
            ac[P] = 1
        else:
            wa[P] +=1


print(str(sum(ac)) + " " + str(sum(wa)))

    

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

tempP = ""
ac = []
wa = []

for count in range(N):
    ac.append(0)
    wa.append(0)

for count in range(M):
    P,S = input().split()
    P = int(P)
    P -= 1
    
    if ac[P] == 0:
        if S == "AC":
            ac[P] = 1
        else:
            wa[P] +=1



a = 0
b = 0
 
for i in range(N):
    if ac[i] == 1:
        a += 1
        b += wa[i]
 
print(*[a, b])
Buggy python submission (verdict: Runtime Error):
inputA= int(input())
inputB =map(str,input().split())

print(inputB.count('ABC'))

Fixed submission:
inputA= int(input())
inputB =input()

print(inputB.count('ABC'))

Buggy python submission (verdict: Runtime Error):
inputA= int(input())
inputB =map(str,input())

print(inputB.count('ABC'))

Fixed submission:
inputA= int(input())
inputB =input()

print(inputB.count('ABC'))

Buggy python submission (verdict: Runtime Error):
inputA= int(input())
inputB =map(input())

print(inputB.count('ABC'))

Fixed submission:
inputA= int(input())
inputB =input()

print(inputB.count('ABC'))

Buggy python submission (verdict: Runtime Error):
inputA,inputB =map(input())

print(inputB.count('ABC'))

Fixed submission:
inputA= int(input())
inputB =input()

print(inputB.count('ABC'))
Buggy python submission (verdict: Runtime Error):
inputA= int(input())
inputB =map(str,input())

print(inputB.count('ABC'))

Fixed submission:

inputA,inputB,inputC = map(int, input().split())

if inputC >= inputA:
    if inputB > inputC-inputA:
        print(0,inputB -(inputC-inputA))
    else:
        print(0,0)
else:
    print(inputA-inputC,inputB)

Buggy python submission (verdict: Runtime Error):

inputA,inputB,inputC = input().split()

if inputC >= inputA:
    if inputB > inputC-inputA:
        print(0,inputB -(inputC-inputA))
    else:
        print(0,0)
else:
    print(inputA-inputC,inputB)



Fixed submission:

inputA,inputB,inputC = map(int, input().split())

if inputC >= inputA:
    if inputB > inputC-inputA:
        print(0,inputB -(inputC-inputA))
    else:
        print(0,0)
else:
    print(inputA-inputC,inputB)
Buggy python submission (verdict: Runtime Error):

inputA = map(int, input())

flag = 0
for count in range(inputA+1,300000):
    for mod in range(2,10000):
        if count % mod == 0:
            flag = mod
            break
        mod += 1
    if count == flag:
        print(count)
        break
    else:
        count += 1


Fixed submission:

inputA = int(input())

flag = 0
for count in range(inputA,300000):

    for mod in range(2,200000):
        if count % mod == 0:
            flag = mod
            break
        mod += 1
    if count == flag:
        print(count)
        break
    elif flag == 0:
        print(inputA)
    else:
        count += 1
Buggy python submission (verdict: Runtime Error):
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

Fixed submission:
import fractions

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

print((a * b) // fractions.gcd(a, b))
Buggy python submission (verdict: Runtime Error):
A,B = map(int,input().splite())

if A > 9:
    print(-1)
elif B > 9:
    print(-1)
else:
    print(A*B)

Fixed submission:
A,B = map(int,input().split())
if A > 9:
    print(-1)
elif B > 9:
    print(-1)
else:
    print(A*B)
Buggy python submission (verdict: Runtime Error):

N = int(input())

result1 = 0
result2 = 0

for count in range(2,N // 2):
    if N % count == 0:
        result1 = count


print(result1+ N // result1 -2)

Fixed submission:
import math

N = int(input())

result1 = 0
result2 = 0
ans = float("inf")
for count in range(1,int(math.sqrt(N))+1):
    if N % count == 0:
        ans = min(ans,count + N // count -2)


print(ans)
Buggy python submission (verdict: Runtime Error):

inputA =  list(map(int,input().split()))
inputB =  list(map(int,input().split()))

humancount = inputA[0]
talllimit = inputA[1]
count= 0

for count in range(0,humancount):
    if inputB(count) >= talllimit:
        count += 1


print(count)

Fixed submission:

inputA =  list(map(int,input().split()))
inputB =  list(map(int,input().split()))

humancount = inputA[0]
talllimit = inputA[1]
anser = 0

for count in range(0,humancount):
    if inputB[count] >= talllimit:
        anser += 1


print(anser)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
sumc = 0

for count in range(N-1):
    if A[count+1] - A[count] == 1:
        sumc = sumc + C[A[count]-1]

print(sumc + sum(B))


Fixed submission:
N = int(input())

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

sumc = 0
ans = 0
for count in range(1,22):
    sumc = A * count 
    if sumc-count + 1 >= B:
        ans = count 
        break
print(ans)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
sumc = 0

for count in range(N-1):
    if A[count+1] - A[count] == 1:
        sumc = sumc + C[A[count]-1]

print(sumc + sum(B))

Buggy python submission (verdict: Runtime Error):
4
2 3 4 1
13 5 8 24
45 9 15

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
sumc = 0

for count in range(N-1):
    if A[count+1] - A[count] == 1:
        sumc = sumc + C[A[count]-1]

print(sumc + sum(B))
Buggy python submission (verdict: Runtime Error):
A.B.C = map(int,input().split())

print(C-(A-B))

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

if C-(A-B) > 0:
    print(C-(A-B))
else:
    print(0)
Buggy python submission (verdict: Time Limit Exceeded):
A,B = map(int,input().split())

flag = False
for count in range(1000000000):
    if abs(A-count) == abs(B-count):
        print(count)
        flag = True
        break
if flag == False:
    print("IMPOSSIBLE")

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

if (A+B) % 2 ==1:
    print("IMPOSSIBLE")
else:
    print(int((A+B)/2))
Buggy python submission (verdict: Runtime Error):
S = int(input())

Sstr = str(S)

if Sstr[0] == Sstr[1] or Sstr[1] == Sstr[2] or Sstr[2] == Sstr[3]:
    print("Bad")
else:
    print("Good")

Fixed submission:
Sstr = str(input())

if Sstr[0] == Sstr[1] or Sstr[1] == Sstr[2] or Sstr[2] == Sstr[3]:
    print("Bad")
else:
    print("Good")
Buggy python submission (verdict: Runtime Error):
n = int(input())

x = 800 * n     # 払った金額

# レストランからもらう金額
if n >= 15:
    y = 200 * (n//15)

# 払った金額 - レストランからもらうお金
ans = x - y
print(ans)

Fixed submission:
n = int(input())

x = 800 * n     # 払った金額

# レストランからもらう金額
y = 0
if n >= 15:
    y = 200 * (n//15)

# 払った金額 - レストランからもらうお金
ans = x - y
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, D = map(int, input().split())

while A or C > 0:
    aoki_hitpoint = C - B
    if aoki_hitpoint <= 0:
        print("Yes")
    else:
        C = aoki_hitpoint

    takahashi_hitpoint = A - D
    if takahashi_hitpoint <= 0:
        print("No")
    else:
        A = takahashi_hitpoint

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

while A or C > 0:
    aoki_hitpoint = C - B
    if aoki_hitpoint <= 0:
        C = 0
        print("Yes")
        exit()
    else:
        C = aoki_hitpoint

    takahashi_hitpoint = A - D
    if takahashi_hitpoint <= 0:
        print("No")
        A = 0
        exit()
    else:
        A = takahashi_hitpoint
Buggy python submission (verdict: Runtime Error):
n = int(input())
sum = 0

if(1 <= N <= 10 ** 6):

 for i in range(1 , n + 1 ):
    if (i % 3 == 0) and (i % 5 == 0):
        n = "FizzBuzz"
    elif (i % 3 == 0):
        n = "Fizz"
    elif (i % 5 == 0):
        n = "ZBuzz"
    else:
        sum += 1

print(sum)

Fixed submission:
N = int(input())
list = []

for i in range(1, N + 1):
    if i % 3 == 0 and i % 5 == 0:
        "FizzBuzz"
    elif i % 3 == 0:
        "Fizz"
    elif i % 5 == 0:
        "Buzz"
    else:
        list.append(i)
print(sum(list))
Buggy python submission (verdict: Runtime Error):
S = str(input())
if S[1] + S[2] == 'A':
    print('Yes')
elif S[2] + S[3] == 'B':
    print('Yes')
else:
    print('No')

Fixed submission:
S = str(input())
if S[0] == S[1] and S[1] == S[2]:
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input(), split())

x = A + B
y = A - B
z = A * B
print(max(x, y, z))

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

x = A + B
y = A - B
z = A * B
print(max(x, y, z))
Buggy python submission (verdict: Runtime Error):
A, B, N = map(int, input().split())

total_price = A + (N * B)

print(total_price - max(total_price))


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

# N人*A円がB円より大きい場合
if N * A > B:
    print(B)
else:
    print(N * A)
Buggy python submission (verdict: Runtime Error):
p, q, r = map(int, input().split())

print(sum[p, q, r] - max[p, q, r])


Fixed submission:
p, q, r = map(int, input().split())
time = [p, q, r]

print(sum(time) - max(time))
Buggy python submission (verdict: Runtime Error):
# 塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対

b = input()

if b == ('A'):
    print(T)

if b == ('C'):
    print(G)

if b == ('T'):
    print(A)

if b == ('G'):
    print(C)

Fixed submission:
# 塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対

b = input()

if b == ('A'):
    print('T')

if b == ('C'):
    print('G')

if b == ('T'):
    print('A')

if b == ('G'):
    print('C')

Buggy python submission (verdict: Runtime Error):
# 塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対

b = input()

if b == ('A'):
    print(T)

elif b == ('C'):
    print(G)

elif b == ('T'):
    print(A)

elif b == ('G'):
    print(C)


Fixed submission:
# 塩基 A, C, G, T が存在し、A と T、C と G がそれぞれ対

b = input()

if b == ('A'):
    print('T')

if b == ('C'):
    print('G')

if b == ('T'):
    print('A')

if b == ('G'):
    print('C')
Buggy python submission (verdict: Runtime Error):
AB, BC, CA = int(input())

print((AB * BC) // 2)


Fixed submission:
AB, BC, CA = map(int, input().split())

print((AB * BC) // 2)

Buggy python submission (verdict: Runtime Error):
ab, bc, ca = int(input())

print((ab * bc) // 2)

Fixed submission:
AB, BC, CA = map(int, input().split())

print((AB * BC) // 2)
Buggy python submission (verdict: Runtime Error):
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(N) / 2 + sum(N) - max(N)

print(math.floor(total_price))

Fixed submission:
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(p) / 2 + sum(p) - max(p)

print(math.floor(total_price))

Buggy python submission (verdict: Runtime Error):
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(N) / 2 + sum(N) - max(N)

print(total_price)

Fixed submission:
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(p) / 2 + sum(p) - max(p)

print(math.floor(total_price))

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

total_price = (max(N) / 2) + (sum(N) - max(N))

print(total_price)

Fixed submission:
import math
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

total_price = max(p) / 2 + sum(p) - max(p)

print(math.floor(total_price))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

print(max(N) - min(N))

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

print(max(A) - min(A))

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

print(max(A) - min(N))

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

print(max(A) - min(A))
Buggy python submission (verdict: Runtime Error):
A, B, C, D = int(input())

if D >= A + C:
    print("Yes")
elif D >= A + B:
    print("Yes")
else:
    print("No")

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

if abs(A - C) <= D:
    print("Yes")
elif abs(A - B) <= D and abs(B - C) <= D:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
A, B, C = str(input())
D = int(input())

if D >= A + C:
    print("Yes")
else:
    print("No")

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

if abs(A - C) <= D:
    print("Yes")
elif abs(A - B) <= D and abs(B - C) <= D:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
A, B, C, D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))

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

train = [a,b]
bus = [c,d]

print(min(train) + min(bus))

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))

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

train = [a,b]
bus = [c,d]

print(train + bus)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))

Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())

train = [a,b]
bus = [c,d]

print(train + bus)

Fixed submission:
A = int(input())
B = int(input())
C = int(input())
D = int(input())

train = [A,B]
bus = [C,D]

print(min(train) + min(bus))
Buggy python submission (verdict: Runtime Error):
C1 = str(input())
C2 = str(input())

if C1[0] == C2[1] and C1[1] == C2[2] and C1[2] == C2[3]:
    print('Yes')
else:
    print('No')

Fixed submission:
C1 = str(input())
C2 = str(input())

if C1[0] == C2[-1] and C1[1] == C2[-2] and C1[2] == C2[-3]:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()

if a[len(a)-1] == b[0] and b[(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')

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

if A == B and B == C:
    print('YES')
else:
    print('NO')

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

if a[len(a)-1] == b[0] and b[len(b)-1] == c[0]:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
S1 = int(input())
S2 = int(input())

if S1 > S2:
    print(S1)
elif S1 == S2:
    print(S1 * S2)
else:
    print(S2)

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

area = [A * B, C * D]

print(max(area))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int,input().split()))

judge = True
ans = 1
for i in range(n):
    ans *= a[i]
    if ans > 10**18:
        judge = false
        break
        
if judge == True:
    print(ans)
else:
    print(-1)

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

judge = True
ans = 0

if 0 not in a:
    ans = 1
    for i in range(n):
        ans *= a[i]
        if ans > 10**18:
            judge = False
            break
        
if judge:
    print(ans)
else:
    print(-1)