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

Fixed submission:
# # # coding=utf-8
# # # Author: lee215

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


# def solve(A, B, C):
#     if len(set([A, B, C])) < 3:
#         print 'Yes'
#     else:
#         print 'No'



def solve(A, B, C):
    if len(set([A, B, C])) == 1:
        print 'Yes'
    else:
        print 'No'

solve(A, B, C)

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

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


def solve(A, B, C):
    if set([A, B, C]) < 3:
        print 'Yes'
    else:
        print 'N0'

solve(A, B, C)

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

get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

# 2019-03-30 20:14

A, B, C = gets()


def solve(A, B, C):
    if A == B == C
        print 'YES'
    else:
        print 'NO'

solve(A, B, C)
Problem p03244 (python)

Fixed submission:
import collections
n = int(raw_input())
A = map(int, raw_input().split(" "))

c1 = collections.Counter(A[::2]).most_common(2)
c2 = collections.Counter(A[1::2]).most_common(2)

res = n
for i, x in c1:
    for j, y in c2:
        if i != j:
            res = min(res, n - x - y)
        res = min(res, n - y)
        res = min(res, n - x)
print res

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

c1 = collections.Counter(A[::2])
c2 = collections.Counter(A[1::2])

res = n
for i in c1:
    for j in c2:
        if i != j:
            res = min(res, n - c1[i] - c2[j])
print res
Problem p02687 (python)

Fixed submission:
S = input()
if 'ABC' == S:
    print('ARC')
elif 'ARC' == S:
    print('ABC')

Buggy submission (verdict: Runtime Error):
X = int(input())
flag = False
for a in range(-1000,1000):
    for b in range(-1000,1000):
        if a**5 - b**5 == X:
            print("{0} {1}".format(a,b))
            flag = True
            break
    if flag:
        break
Problem p02690 (python)

Fixed submission:
X = int(input())
# X = a**5 - b**5 
#   = (a-b)(a**4 + a**3 * b + a**2 * b**2 + a * b**3 + b**4)
# よって、X は　a-b　の倍数 X%(a-b) = 0

# a**5  = b**5 + X
#   a   = ( b**5 + X )**(1/5)
# X< 10**9 を満たす a,bの最大値は、120 , 119
flag = False
for ai in range(-119,120):
    for bi in range(-120,119):
        if ai - bi != 0 and X > (ai - bi):
            if X % (ai - bi) == 0:
                if ai**5 - bi**5 ==X:
                    print(int(ai),int(bi))
                    flag = True
                    break
        else:
            if ai**5 - bi**5 ==X:
                print(int(ai),int(bi))
                flag = True
                break
    if flag:
        break

Buggy submission (verdict: Runtime Error):
X = int(input())
flag = False
for ai in range(-119,120):
    for bi in range(-120,119):
    	if ai**5 - bi**5 ==X:
        	print(int(ai),int(bi))
            flag = True
            break
    if flag:
        break
Problem p02696 (python)

Fixed submission:
A,B,N = map(int,input().split())
def f(x):
    return int((A *( x % B ) - (A * x % B)) / B)
if N >= B-1:
    print(f(B-1))
else:
    print(f(N))

Buggy submission (verdict: Runtime Error):
import numpy as np
A,B,N = map(int,input().split())
def f(x):
    return floor(A * x / B) - A * floor(x / B)
def floor(x):
    return x.astype(np.int64)
xArray = np.asarray(range(1,N+1))
score = np.zeros(len(xArray),np.int64)
score += f(xArray)
print(score.max())

Buggy submission (verdict: Runtime Error):
import numpy as np
A,B,N = map(int,input().split())
narray = np.asarray(range(1,N+1))
store = np.zeros(len(narray),np.int64)
AxPerB = (A * narray) / B
xPerB = (narray / B)
store += AxPerB.astype(np.int64) - A * xPerB.astype(np.int64)
print(store.max())

Buggy submission (verdict: Runtime Error):
import numpy as np
A,B,N = map(int,input().split())
narray = np.asarray(range(1,N+1))
store = np.zeros(len(narray),np.int32)
AxPerB = (A * narray) / B
xPerB = (narray / B)
store += AxPerB.astype(np.int32) - A * xPerB.astype(np.int32)
print(store.max())
Problem p02697 (python)

Fixed submission:
def main():
    n,m = map(int, input().split())
    if n%2==0 and 2*(m+1)==n:
        if n%4:
            for i in range(1,n//4+1):
                print(i,n//2-i)
            j = n

            for i in range(n//2+1,n//2+n//4+1):
                print(i,j)
                j -= 1
        else:
            for i in range(1,n//4+1):
                print(i,n//2+1-i)
            j = n-1
            for i in range(n//2+1,n//2+n//4):
                print(i,j)
                j -= 1
    else:
        for i in range(1,m+1):
            print(i,n-i)
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from collections import deque
def main():
    n,m = map(int, input().split())
    if n%2==0 and 2*(m+1)==n:
        lst = deque([i for i in range(1,n+1)])
        for i in range(1,m+1):
            a = lst.popleft()
            b = a + i
            lst.remove(b)
            print(str(a)+' '+str(b))
    else:
        for i in range(1,n//2+1):
            print(str(i)+' '+str(n-i))
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from collections import deque
def main():
    n,m = map(int, input().split())
    lst = deque([i for i in range(1,n+1)])
    for i in range(1,m+1):
        a = lst.popleft()
        b = a + i
        lst.remove(b)
        print(str(a)+' '+str(b))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    n,m = map(int, input().split())
    lst = [i for i in range(1,n+1)]
    for i in range(1,m+1):
        a = lst.pop(0)
        b = a + i
        lst.remove(b)
        print('{} {}'.format(a,b))

if __name__ == '__main__':
    main()
Problem p02756 (python)

Fixed submission:
from collections import deque

def main():
    ans = deque(input())
    n = int(input())
    vec = 1
    for i in range(n):
        q = input()
        if q == "1":
            vec *= -1
        else:
            _,o,s = q.split()
            if ((o == "1") and (vec == 1)) or ((o == "2") and (vec == -1)):
                ans.appendleft(s)
            else:
                ans.append(s)
    if vec == -1:
        ans.reverse()
    ans = ''.join(ans)
    print(ans)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
ans = input()
n = int(input())
for i in range(n):
    query = input()
    if query == "1":
        ans = ''.join(list(ans).reverse())
    else:
        _,option,str = query.split()
        if option == "1":
            ans = str + ans
        else:
            ans += str
print(ans)
Problem p02993 (python)

Fixed submission:
s = input()
ans = "Good"
for i in range(3):
  if s[i] == s[i+1]:
    ans = "Bad"
print(ans)

Buggy submission (verdict: Runtime Error):
n = input()
ans = "Good"
for i in range(3):
  if n[i] == n[i+1]:
    ans = "Bad
print(ans)
Problem p02995 (python)

Fixed submission:
import math
from fractions import gcd
a,b,c,d = map(int,input().split())
x = b//c - (a-1)//c
y = b//d - (a-1)//d
l = c * d // gcd(c,d)
z = b//l - (a-1)//l
print(b-a+1-x-y+z)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a = np.empty((0,2),int)
for i in range(n):
    b = np.array([[int(i) for i in input().split()]])
    a = np.append(a,b,axis=0)
a = a[np.argsort(a[:, 1])]
ans = "Yes"
k = 0
for i in range(len(a)):
    k += a[i,0]
    if k > a[i,1]:
        ans = "No"
        break
print(ans)

Buggy submission (verdict: Runtime Error):
import math
a,b,c,d = map(int,input().split())
x = math.floor(b/c) - math.ceil(a/c) + 1
y = math.floor(b/d) - math.ceil(a/d) + 1
g = c * d // math.gcd(c,d)
z = math.floor(b/g) - math.ceil(a/g) + 1
print(b-a+1-(x+y-z))
Problem p02996 (python)

Fixed submission:
import sys
from operator import itemgetter
def input():
    return sys.stdin.readline()[:-1]
n = int(input())
a = [list(map(int, input().split())) for i in range(n)]
a.sort(key=itemgetter(1))
ans = "Yes"
k = 0
for i in range(len(a)):
    k += a[i][0]
    if k > a[i][1]:
        ans = "No"
        break
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
n = int(input())
a = np.empty((0,2),int)
for i in range(n):
    b = np.array([[int(i) for i in input().split()]])
    a = np.append(a,b,axis=0)
a = a[np.argsort(a[:, 1])]
ans = "Yes"
k = 0
for i in range(len(a)):
    k += a[i,0]
    if k > a[i,1]:
        ans = "No"
        break
print(ans)
Problem p03023 (python)

Fixed submission:
n = int(input())
ans = int(180*(n-2))
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
ans = int(180*(n-2))
prunt(ans)
Problem p03035 (python)

Fixed submission:
a,b = map(int,input().split())
if a < 6:
    b = 0
elif a < 13:
    b /= 2
print(int(b))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = [int(i) for i in input().split()]
a.sort()
for i in range(m):
    b,c = map(int,input().split())
    if a[0] < b:
        for j in range(b):
            a[j] = max(a[j],c)
    a.sort()
print(sum(a))
Problem p03037 (python)

Fixed submission:
n,m = map(int,input().split())
s = 0
t = n
for i in range(m):
    l,r = map(int,input().split())
    s = max(s,l)
    t = min(t,r)
print(max(t-s+1,0))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
min = 0
max = 0
for i in range(m):
    l,r = map(int,input().split())
    min = min(min,l)
    max = max(max,r)
print(int(n-max+min))
Problem p03165 (python)

Fixed submission:
def main():
    s = input()
    t = input()
    dp = [[0] * (len(t)+1) for _ in range(len(s)+1)]
    for i,x in enumerate(s):
        for j,y in enumerate(t):
            if x == y:
                dp[i+1][j+1] = dp[i][j] + 1
            else:
                dp[i+1][j+1] =  max(dp[i][j+1], dp[i+1][j])

    ans = ''
    i,j = len(s),len(t)
    while (i>0  and j>0):
        if dp[i][j] == dp[i-1][j]:
            i -= 1
        elif dp[i][j] == dp[i][j-1]:
            j -= 1
        else:
            ans += s[i-1]
            i -= 1
            j -= 1
    print(ans[::-1])

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    s = input()
    t = input()
    dp = [[0] * len(s) for _ in range(len(t))]
    for i,x in enumerate(s):
        for j,y in enumerate(t):
            if i == 0:
                dp[i][j] = 1 if x in t[:j+1] else 0
            elif j == 0:
                dp[i][j] = 1 if y in s[:i+1] else 0
            elif x == y:
                dp[i][j] = dp[i-1][j-1] + 1
            else:
                dp[i][j] = max(dp[i-1][j], dp[i][j-1])
    print(dp[len(s)-1][len(t)-1])

if __name__ == '__main__':
    main()
Problem p03166 (python)

Fixed submission:
from collections import deque

class Graph:
    def __init__(self,size):
        self.graph = [ {
            'idx' : i,
            'to': [],
            'inputs' : 0,
        } for i in range(size) ]

    def add_node(self,start,end):
        self.graph[start]['to'].append(end)
        self.graph[end]['inputs'] += 1

    def topological_sort(self):
        inputs = [i['inputs'] for i in self.graph]
        no_inputs = deque([ i['idx'] for i in self.graph if i['inputs'] == 0])
        ans = []
        while no_inputs:
            vertex1 = no_inputs.popleft()
            ans.append(vertex1)
            for vertex2 in self.graph[vertex1]['to']:
                inputs[vertex2] -= 1
                if inputs[vertex2] == 0:
                    no_inputs.append(vertex2)
        return ans

def main():
    n,m = map(int, input().split())
    G = Graph(n)
    for _ in range(m):
        x,y = map(int, input().split())
        G.add_node(x-1,y-1)
    tp = G.topological_sort()
    dist = [0] * n
    for v in tp[::-1]:
        for t in G.graph[v]['to']:
            if dist[v] <= dist[t]:
                dist[v] = dist[t] + 1
    print(max(dist))

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
from collections import deque

class Graph:
    def __init__(self,size):
        self.graph = [ {
            'idx' : i,
            'to': [],
            'inputs' : 0,
        } for i in range(size) ]

    def add_node(self,start,end):
        self.graph[start]['to'].append(end)
        self.graph[end]['inputs'] += 1

    def topological_sort(self):
        inputs = [i['inputs'] for i in self.graph]
        no_inputs = deque([ i['idx'] for i in self.graph if i['inputs'] == 0])
        ans = []
        while no_inputs:
            vertex1 = no_inputs.popleft()
            ans.append(vertex1)
            for vertex2 in self.graph[vertex1]['to']:
                inputs[vertex2] -= 1
                if inputs[vertex2] == 0:
                    no_inputs.append(vertex2)
        return ans

def main():
    n,m = map(int, input().split())
    G = Graph(m)
    for _ in range(n):
        x,y = map(int, input().split())
        G.add_node(x-1,y-1)
    tp = G.topological_sort()
    dist = [0] * n
    for v in tp[::-1]:
        for t in G.graph[v]['to']:
            if dist[v] <= dist[t]:
                dist[v] = dist[t] + 1
    print(max(dist))

if __name__ == '__main__':
    main()
Problem p02675 (python)

Fixed submission:
n=input()
hon="24579"
pon="0168"
x=n[len(n)-1]
if x in hon:
	print("hon")
elif x in pon:
	print("pon")
else:
	print("bon")

Buggy submission (verdict: Runtime Error):

n=input()
hon="24579"
pon="0168"
x=n[len(n)-1]
if x in hon:
  print("hon")
  elif x in pon:
    print("pon")
    else:
      print("bon")

Buggy submission (verdict: Runtime Error):
while True:
	n=input()
	hon="24579"
	pon="0168"
	x=n[len(n)-1]
	if x in hon:
		print("hon")
	elif x in pon:
		print("pon")
	else:
		print("bon")
Problem p02719 (python)

Fixed submission:
n, k = map(int, input().split())
j = n % k
print(j if k-j > j else k-j )

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
while(a>=b):
	a=abs(a-b)
print(a)
Problem p02720 (python)

Fixed submission:
from collections import deque
K=int(input())
que=deque([1,2,3,4,5,6,7,8,9])
for i in range(K):
    a=que.popleft()
    if not a%10==0:
        que.append(a*10+a%10-1)
    que.append(a*10+a%10)
    if not a%10==9:
        que.append(a*10+a%10+1)
print(a)

Buggy submission (verdict: Runtime Error):
from collections import deque
k=int(input())
deq=deque([1,2,3,4,5,6,7,8,9])
for  in range(k):
  a=deq.popleft()
  if not a%10==0:
    deq.append(a*10+a%10-1)
  deq.append(a*10+a%10)
  if a%10==9:
    deq.append(a*10+a%10+1)
print(a)

Buggy submission (verdict: Runtime Error):
from collections import deque
k=int(input())
deq=deque([1,2,3,4,5,6,7,8,9])
for in in range(k):
  a=deq.popleft()
  if not a%10==0:
    deq.append(a*10+a%10-1)
  deq.append(a*10+a%10)
  if a%10==9:
    deq.append(a*10+a%10+1)
print(a)
Problem p02724 (python)

Fixed submission:
x = int(input())

a = x//500
b = x-(a*500)
c = b//5
d = (a*1000)+(c*5)
print(d)

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

a = x//500
b = x-(a*500)
c = b//5
print(sum((a*1000)+(c*5)))
Problem p02765 (python)

Fixed submission:
n,r=map(int,input().split())
if n>=10:
    print(r)
else:
    print(r+100*(10-n))

Buggy submission (verdict: Runtime Error):
import math
n,a,b=map(int,input().split())
c=0
for i in range(1,n+1):
    c+=(math.factorial(n)//(math.factorial(n - i) * math.factorial(i)))%(pow(10,9)+7)

c=c-(math.factorial(n)//(math.factorial(n - a) * math.factorial(a)))%(pow(10,9)+7)
c=c-(math.factorial(n)//(math.factorial(n - b) * math.factorial(b)))%(pow(10,9)+7)
print(c)
#TLE
Problem p02818 (python)

Fixed submission:
a,b,k=map(int,input().split(' '))
if(a>k):
    aa=a-k
elif (a<=k):
    aa=0
    b=max(b+a-k,0)
print(str(aa)+' '+str(b))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split(' '))
if(a>k):
    a=a-k
elif (a<=k):
    aa=0
    b=max(b+a-k,0)
print(str(aa)+' '+str(b))

Buggy submission (verdict: Runtime Error):
a,b,k=map(int,input().split(' '))
if(a>k):
    a=a-k
elif (a<=k):
    aa=0
    b=b+a-k
print(str(aa)+' '+str(b))
Problem p02911 (python)

Fixed submission:
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
p=[k-q]*n
for i in range(q):
   #q回の正解が出る
    r=a[i]-1
    p[r]=p[r]+1
    #正解したら１点多くなる
for i in range(n):
    if p[i]>0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
p=[k-q]*n
for i in range(q):
   #q回の正解が出る
    r=a[i]
    p[r]=p[r]+1
for i in range(n):
    if p[i]>0:
        print('Yes')
    else:
        print('No')

Buggy submission (verdict: Runtime Error):
n,k,q=map(int,input().split())
a=[int(input()) for i in range(q)]
p=[k-q]*n
print(p)
for i in range(q):
   #q回の正解が出る
   r=a[i]
   print(a[i])
   p[r]=p[r]+1
for i in range(n):
    if p[i]>0:
        print('Yes')
    else:
        print('No')
Problem p02921 (python)

Fixed submission:
s=input()
t=input()
a=0
for i in range (0,3):
    if s[i]==t[i]:
        a=a+1
print(a)

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
a=0
for i in range (0,2):
    if s[i]=t[i]
    a=a+1
print(a)
Problem p02969 (python)

Fixed submission:
a=int(input())
print(3*a*a)

Buggy submission (verdict: Runtime Error):
a=input()
print(3*a*a)
Problem p02999 (python)

Fixed submission:
x,a=map(int,input().split())
if x>=a:
    print('10')
else:
    print('0')

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
a=1
for i in range(n-1):
    a+=1
    d+=l[i]
    #print(d)
    if d>x:
        break


print(a)
Problem p03000 (python)

Fixed submission:
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
a=1
for i in range(n):
    d+=l[i]
    #print(d)
    if d<=x:
        a+=1
print(a)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
a=0
i=0
while d<x:
    d+=l[i]
    a+=1
    i+=1
if d==x:
    a+=1
print(a)

Buggy submission (verdict: Runtime Error):
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
a=0
i=0
while d<=x:
    d+=l[i]
    a+=1
    i+=1
print(a)
Problem p03035 (python)

Fixed submission:
a,b=(int (x) for x in input().split())
if a<=5:
  print(0)
elif a<=12:
  print(int(b/2))
else:
  print(b)

Buggy submission (verdict: Runtime Error):
a,b=(int (x) for x in input().split())
if a<=5:
  print(0)
elif a<=12:
  print(int((b/2))
else:
  print(b)
Problem p03071 (python)

Fixed submission:
a_str=input().split()
a=[int(i) for i in a_str]
a.sort()

if int(a[1]) != int(a[0]):
	print (2*int(a[1])-1)
else:
	print (int(a[0]) + int(a[1]))

Buggy submission (verdict: Runtime Error):
a=list(input().split())
a.sort()
if int(a[1])!=int(a[2]):
	print (2*int(a[1])-1)
else:
	print (2*int(a[1]))
Problem p03101 (python)

Fixed submission:
H,W=map(int,input().split())
h,w=map(int,input().split())
S=H*W
Hw=H*w
Wh=W*h
wh=w*h
print(S-Hw-Wh+wh)

Buggy submission (verdict: Runtime Error):
H,W=(int,input().split())
h,w=(int,input().split())
S=H*W
print(S-(H*w+W*h)+w*h)

Buggy submission (verdict: Runtime Error):
H,W=(int,input().split())
h,w=(int,input().split())
S=H*W
print(S-(H*w+W*h)+w*h)
#どうやっても想定と違う値が出る　後で考え直す
Problem p03227 (python)

Fixed submission:
str = input()

if len(str)==(2): 
  print(str)
else:
  print(str[::-1])

Buggy submission (verdict: Runtime Error):
s = 'S'

print(len(s))

s_length = len(s)
print(s_length)

if s_length=2
print (s)

else print str[::-1]
str = "S"
Problem p03238 (python)

Fixed submission:
y=int(input())

if y==1:
  print('Hello World')
else:
  a=int(input())
  b=int(input())
  print(int(a+b))

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

if y==1:
  print('Hello World')
else:
  print(a+b)
Problem p03281 (python)

Fixed submission:
n=int(input())
if n<105:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2)
elif n<189:
  print(3)
elif n<195:
  print(4)
else:
  print(5)

Buggy submission (verdict: Runtime Error):
n=int(input())
elif n<105:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2)
else:
  print(3)
Problem p03308 (python)

Fixed submission:
n = input()
a = list(map(int,input().split()))
print(max(a)-min(a))

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

 print(max(a)-min(a))
Problem p03323 (python)

Fixed submission:
a,b=(int(x) for x in input().split())
if a>=9:
  print(':(')
elif b>=9:
  #ここ↑のイコールを忘れてた
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a,b=(int(i) for i in input().split())
if a>=9
  print(':(')
elif b>=9:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
if a>=9:
  print('')
elif b>=9:
  print(':(')
else:
  print('Yay!')

Buggy submission (verdict: Runtime Error):
a,b=input().split()
if a>=9:
  print('')
elif b>=9:
  print(':(')
else:
  print('Yay!')
Problem p03555 (python)

Fixed submission:
a=input()
b=input()
if a[0]==b[2] and a[1]==b[1] and a[2]==b[0]:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n=int(input())
for i in range(0,n):
    if n==1 or n==2:
        print(n)
        break
    if n>=i*i:
        pass
    else:
        print((i-1)*(i-1))
        break
Problem p03610 (python)

Fixed submission:
import math
s=input()
li=[]

l=len(s)+1

for i in range(0,math.floor(l/2)):
    li.append(s[2*i])

str=''.join(li)
print(str)

Buggy submission (verdict: Runtime Error):
li=list(input())
n=1
c=len(li)+n

while n<=c:
  li=li.pop(n)
  n=n+1

print(li)

Buggy submission (verdict: Runtime Error):
li=list(input())
n=1
c=len(li)+n

while n<=c:
  
  li=li.pop(n)
  n=n+1

print(a)
Problem p03693 (python)

Fixed submission:
r,g,b=map(int,input().split())
if (10*g+b)%4==0:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
c=[]
for i in range(n):
    if a[i]<=399:
        c.append('0')
    elif a[i]<=799:
        c.append('1') 
    elif a[i]<=1199:
        c.append('2')
    elif a[i]<=1599:
        c.append('3')
    elif a[i]<=1999:
        c.append('4')
    elif a[i]<=2399:
        c.append('5')
    elif  a[i]<=2799:
        c.append('6')
    elif  a[i]<=3199:
        c.append('7')
x=n-len(c)
#3200以上の人数
c=list(set(c))

print(max(len(c),1), len(c)+x)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int,input().split()))
c=[]
for i in range(n):
    if a[i]<=399:
        c.append('gray')
    elif a[i]<=799:
        c.append('br') 
    elif a[i]<=1199:
        c.append('green')
    elif a[i]<=1599:
        c.append('pb')
    elif a[i]<=1999:
        c.append('bl')
    elif a[i]<=2399:
        c.append('y')
    elif  a[i]<=2799:
        c.append('o')
    elif  a[i]<=3199:
        c.append('r')
x=n-len(c)
#3200以上の人数
c=list(set(c))
k=min(8,len(c)+x)
print(len(c),k)
Problem p03760 (python)

Fixed submission:
s=input()+' '
t=input()+' '
st=''

for i in range(min(len(s),len(t))):
    st+=s[i]
    st+=t[i]
print(st.strip())

Buggy submission (verdict: Runtime Error):
s=input()
t=input()
st=''
for i in range(len(s)):
    st+=s[i]
    st+=t[i]
print(st)
Problem p03997 (python)

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print(int(((a+b)*h/2)))

Buggy submission (verdict: Runtime Error):
a=int(input())
b=int(input())
h=int(input())
print(int(((a+b)*h/2))