Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from sys import stdin
import sys
# sys.setrecursionlimit(10**8)

def nextLine(): return next(stdin)
def nextStrList(): return nextLine().split()
def nextIntList(): return [int(_) for _ in nextStrList()]


def main():
	n=int(nextLine())
	aList=nextIntList()
	
	num=n//2
	score=[[None for _ in range(num)] for i in range(n)]
	
	for i in range(n):
		
		if i==0:
			score[i][0]=aList[i]
		else:
			score[i][0]=max(aList[i], score[i-1][0])
			
		for j in range(1, num):
			nextScore=[]
			if i>=1:
				s=score[i-1][j]
				if s is not None:
					nextScore.append(s)
			if i>=2:
				s=score[i-2][j-1]
				if s is not None:
					s+=aList[i]
					nextScore.append(s)
			if len(nextScore)>0:
				nextScore=max(nextScore)
				score[i][j]=nextScore
	
# 		print(i, *[str(s) for s in score[i]], sep="\t")
	
	print(score[-1][-1])
	
if __name__=="__main__":
	main()


Fixed submission:
from sys import stdin
import sys
# sys.setrecursionlimit(10**8)

def nextLine(): return next(stdin)
def nextStrList(): return nextLine().split()
def nextIntList(): return [int(_) for _ in nextStrList()]

# def comp0(n, aList):
# 	num=n//2
# 	score=[[None for _ in range(num)] for i in range(n)]
# 	
# 	for i in range(n):
# 		
# 		if i==0:
# 			score[i][0]=aList[i]
# 		else:
# 			score[i][0]=max(aList[i], score[i-1][0])
# 			
# 		for j in range(1, num):
# 			nextScore=[]
# 			if i>=1:
# 				s=score[i-1][j]
# 				if s is not None:
# 					nextScore.append(s)
# 			if i>=2:
# 				s=score[i-2][j-1]
# 				if s is not None:
# 					s+=aList[i]
# 					nextScore.append(s)
# 			if len(nextScore)>0:
# 				nextScore=max(nextScore)
# 				score[i][j]=nextScore
# 	
# # 		print(i, aList[i], *[str(s) for s in score[i]], sep="\t")
# 	
# 	print(score[-1][-1])
	
	
def comp(n, aList):
	num=n//2
	score=[[None for _ in range(num)] for i in range(3)]
# 	base=[0 for _ in range(num)]
	
	for i in range(n):
		for j in range(max(0, num-(n-i)//2-1), min(i//2+1,num)):
			if j==0:
				if i==0:
					ns=aList[i]
				else:
					ns=max(aList[i], score[(i-1)%3][0])
			else:
				nextScore=[]
				if i>=1:
					s=score[(i-1)%3][j]
					if s is not None:
						nextScore.append(s)
				if i>=2:
					s=score[(i-2)%3][j-1]
					if s is not None:
						s+=aList[i]
						nextScore.append(s)
				if len(nextScore)>0:
					ns=max(nextScore)
			
			score[i%3][j]=ns
	
# 		print(i, *[str(s) for s in score[i%3]], sep="\t")
	
	print(score[(n-1)%3][-1])


def main():
	n=int(nextLine())
	aList=nextIntList()

# 	import numpy as np
# 	n=200000
# # 	aList=list(np.random.randint(-1000000000, 1000000001, n))
# # 	n=22
# 	aList=list(np.random.randint(-9, 10, n))
	
	comp(n, aList)
# 	comp0(n, aList)
	
	
if __name__=="__main__":
	main()
Buggy python submission (verdict: Runtime Error):

from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def nextLine(): return next(stdin)
def nextStrList(): return nextLine().split()
def nextIntList(): return [int(_) for _ in nextStrList()]


def main():
	k=nextIntList()[0]
	if k<=9:
		print(k)
		sys.exit(0)
	num=[0,1]
	for i in range(10, k):
# 		print(num)
		if all([n==9 for n in num]):
			num=[*[0 for d in range(len(num))], 1]
			continue
		
		for di in range(len(num)):
			if di==0:
				if num[di]<=num[di+1] and num[di]<9:
					num[di]+=1
					break
			elif di<len(num)-1:
				if num[di]<=num[di+1] and num[di]<9 and num[di]<=num[di-1]:
					num[di]+=1
					break
			else: #di==len(num)-1
				num[di]+=1
	
		for dii in range(di-1, -1,-1):
			if num[dii+1]==0:
				num[dii]=0
			else:
				num[dii]=num[dii+1]-1 
	
	print("".join(str(n) for n in reversed(num)))

if __name__=="__main__":
	main()


Fixed submission:

from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def nextLine(): return next(stdin)
def nextStrList(): return nextLine().split()
def nextIntList(): return [int(_) for _ in nextStrList()]


def main():
	k=nextIntList()[0]
	if k<=9:
		print(k)
		sys.exit(0)
	num=[0,1]
	for i in range(10, k):
# 		print(num)
		if all([n==9 for n in num]):
			num=[0 for d in range(len(num))]
			num.append(1)
			continue
		
		for di in range(len(num)):
			if di==0:
				if num[di]<=num[di+1] and num[di]<9:
					num[di]+=1
					break
			elif di<len(num)-1:
				if num[di]<=num[di+1] and num[di]<9 and num[di]<=num[di-1]:
					num[di]+=1
					break
			else: #di==len(num)-1
				num[di]+=1
	
		for dii in range(di-1, -1,-1):
			if num[dii+1]==0:
				num[dii]=0
			else:
				num[dii]=num[dii+1]-1 
	
	print("".join(str(n) for n in reversed(num)))

if __name__=="__main__":
	main()
Buggy python submission (verdict: Runtime Error):

def main(inputs):
	x=int(inputs[0][0])
	n=x//500
	x-=n*500
	n1=x//5
	print(n*1000+n1*5)


if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)


Fixed submission:

def getIntList(inp):
	return [int(_) for _ in inp]


from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs

def main(inputs):
	x=int(inputs[0][0])
	n=x//500
	x-=n*500
	n1=x//5
	print(n*1000+n1*5)


if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)
Buggy python submission (verdict: Runtime Error):

from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs

def main(inputs):
	k,n=getIntList(inputs[0])
	aList=getIntList(inputs[1])
	
	d=k-aList[n-1]+aList[0]
	di=n-1
# 	print(d,di)
	for ai in range(n-1):
		dd=aList[ai+1]-aList[ai]
# 		print(dd)
		if dd>d:
			di=ai
			d=dd
	
	print(k-d)


if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)


Fixed submission:
def getIntList(inp):
	return [int(_) for _ in inp]


from sys import stdin
import sys
sys.setrecursionlimit(10**8)

def getInputs():
	inputs=[]
	for line in stdin:
		line=line.split()
		inputs.append(line)
	return inputs

def main(inputs):
	k,n=getIntList(inputs[0])
	aList=getIntList(inputs[1])
	
	d=k-aList[n-1]+aList[0]
	di=n-1
# 	print(d,di)
	for ai in range(n-1):
		dd=aList[ai+1]-aList[ai]
# 		print(dd)
		if dd>d:
			di=ai
			d=dd
	
	print(k-d)


if __name__=="__main__":
	inputs=getInputs()
# 	inputs=simInputs()
	main(inputs)
Buggy python submission (verdict: Runtime Error):
s = input()
len_s = len(s)
ans = 0
for i in range(len_s):
    for j in range(i + 3 , len_s + 1):
        if int(s[i:j]) % 2019 == 0:
            ans += 1
print(ans)



Fixed submission:
s, w =[int(i) for i in input().split()]
if w >= s:
    print('unsafe')
else:
    print('safe')

Buggy python submission (verdict: Runtime Error):
s = input()
len_s = len(s)
ans = 0
for i in range(len_s):
    for j in range(i + 4 , len_s + 1):
        if int(s[i:j]) % 2019 == 0:
            ans += 1
print(ans)

Fixed submission:
s, w =[int(i) for i in input().split()]
if w >= s:
    print('unsafe')
else:
    print('safe')

Buggy python submission (verdict: Runtime Error):
s = input()
len_s = len(s)
ans = 0
for i in range(len_s - 3):
    for j in range(i + 4 , len_s + 1):
        if int(s[i:j]) % 2019 == 0:
            ans += 1
print(ans)

Fixed submission:
s, w =[int(i) for i in input().split()]
if w >= s:
    print('unsafe')
else:
    print('safe')

Buggy python submission (verdict: Runtime Error):
s = input()
len_s = len(s)
ans = 0
for i in range(len_s - 4):
    for j in range(i + 4 , len_s + 1):
        if int(s[i:j]) % 2019 == 0:
            ans += 1
print(ans)

Fixed submission:
s, w =[int(i) for i in input().split()]
if w >= s:
    print('unsafe')
else:
    print('safe')
Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = T - i*0.006 for i in Hi
Result = [abs(i) for i in (Ave - A)]
print(index(min(Result))+1)


Fixed submission:
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = T - i*0.006 for i in Hi
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


Fixed submission:
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = int(i) for i in input().split()
Hi = [int(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


Fixed submission:
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = [float(i) for i in input().split()]
Hi = [float(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)


Fixed submission:
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)

Buggy python submission (verdict: Runtime Error):
N = int(input())
T,A = [int(i) for i in input().split()]
Hi = [int(i) for i in input().split()]
Ave = [T - i*0.006 for i in Hi]
Result = [abs(i) for i in Ave - A]
print(index(min(result)) + 1)

Fixed submission:
N = int(input())
T,A = [int(i) for i in input().split()]
H = [int(i) for i in input().split()]
sub = [0 for i in range(N)]
for i in range(N):
    sub[i] = abs(A - (T - 0.006*H[i]))
print(sub.index(min(sub))+1)
Buggy python submission (verdict: Runtime Error):
a,b = map(int, input().split())
if (a * b) % == 0:
  print("Evern")
else:
  print("Odd")

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

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

Fixed submission:
a,b = map(int, input().split())
if (a * b) % 2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while True:
    if [i for i in nums if i % 2 == 1]:
        break
    nums = [i//2 for i in nums]
    ans += 1
print(ans)

Fixed submission:
s = input()
print(s.count("1"))

Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while Ture:
  if [i for i in nums if i % 2 == 1]:
    break
  nums = [ i//2 for i in nums]
  ans += 1
print(ans)


Fixed submission:
s = input()
print(s.count("1"))

Buggy python submission (verdict: Runtime Error):
s = input()
print(s.count(1))

Fixed submission:
s = input()
print(s.count("1"))
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while Ture:
  if [i for i in if i % 2 == 1]:
    break
  nums = [ i//2 for i in nums]
  ans += 1
print(ans)

Fixed submission:
n = int(input())
nums = [int(i) for i in input().split()]
ans = 0
while True:
    if [i for i in nums if i % 2 == 1]:
        break
    nums = [i//2 for i in nums]
    ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
nums = [2**i for i in range(1,7)]
ans = [i - n for i in nums if (i - n) >= 0]
print(ans[0])

Fixed submission:
N = int(input())
ans = 1
while True:
  if N < ans <<1:
    break
  ans<<=1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
q = int(input())
for i in range(q):
    query = input().split()
    if query[0] == '1':
        s = s[::-1]
    elif query[1] == '1':
        s = query[2] + s
    else:
        s = s + query[2]
print(s)


Fixed submission:
from collections import deque

s = deque(input())
q = int(input())
is_reversed = False
for i in range(q):
    query = input().split()
    if query[0] == '1':
        is_reversed = not is_reversed
    elif (query[1] == '2') ^ is_reversed:
        s.append(query[2])
    else:
        s.appendleft(query[2])
if is_reversed:
    s.reverse()
print(''.join(s))
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
n, k = map(int, input().split())
p_seq = np.array(list(map(int, input().split())))
print(max(sum((p_seq[i:i+k] + 1) / 2) for i in range(n - k + 1)))


Fixed submission:
import numpy as np
n, k = map(int, input().split())
p_seq = np.array(list(map(int, input().split())))
e_seq = (p_seq + 1) / 2
s_seq = [0]
for e in e_seq:
    s_seq.append(s_seq[-1] + e)
print(max(s_seq[i + k] - s_seq[i] for i in range(n - k + 1)))
Buggy python submission (verdict: Runtime Error):
a = int(input)
b = int(input)
print(6 - a - b)

Fixed submission:
a = int(input())
b = int(input())
print(6 - a - b)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a_list = list(map(int, input().split()))

p = 1
ans = 0
while True:
    if p not in a_list:
        ans += len(a_list)
        break
    i = a_list.index(p)
    ans += i
    a_list = a_list[i+1:]
    p += 1
if ans == n:
    ans = -1
print(ans)


Fixed submission:
from collections import deque

n = int(input())
a_list = deque(map(int, input().split()))

p = 1
ans = 0
while len(a_list) > 0:
    if a_list.popleft() == p:
        p += 1
    else:
        ans += 1
if ans == n:
    ans = -1
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys
import math


def main():
    input = sys.stdin.readline
    a, b = (int(i) for i in input().split())
    if a <= b:
        print("unsafe")
    else:
        print("safe)


main()


Fixed submission:
import sys
import math


def main():
    input = sys.stdin.readline
    a, b = (int(i) for i in input().split())
    if a <= b:
        print("unsafe")
    else:
        print("safe")


main()
Buggy python submission (verdict: Time Limit Exceeded):
import collections
n=int(input())
a=list(map(int,input().split()))
b = collections.Counter(a)
total = 0

for i in b.values():
  total += i*(i-1)//2
  
for i in range(n):
  to = a.count(a[i])-1
  print(total-(to*(to+1)//2)+(to*(to-1)//2))
  
  
 

Fixed submission:
import collections
n=int(input())
a=list(map(int,input().split()))
b = collections.Counter(a)
total = 0

for i in b.values():
  total += i*(i-1)//2
  
for i in a:
  c = b[i]
  print(total-(c*(c-1)//2)+((c-1)*(c-2)//2))

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=list(map(int,input().split()))
a1 = sorted(a)
a1 = list(set(a1))
total = 0

for i in range(len(a1)):
  to = a.count(a1[i])
  total += (to*(to-1)//2)
  
for i in range(n):
  to = a.count(a[i])-1
  print(total-(to*(to+1)//2)+(to*(to-1)//2))
  
  
 

Fixed submission:
import collections
n=int(input())
a=list(map(int,input().split()))
b = collections.Counter(a)
total = 0

for i in b.values():
  total += i*(i-1)//2
  
for i in a:
  c = b[i]
  print(total-(c*(c-1)//2)+((c-1)*(c-2)//2))
Buggy python submission (verdict: Runtime Error):
n,m = list(map(int,input().split()))
ans = [-1] * n

if n == 1 and m == 0:
  print(0)
  
for i in range(m):
  s,c = list(map(int,input().split()))
  if ans[s-1] != -1 and ans[s-1] != c:
    print(-1)
    exit()
  
  else:
    ans[s-1] = c

if ans.count(-1) >= 2:
  print(-1)
  exit()
  
elif ans[0] == 0 and n >= 2:
  print(-1)
  exit()
  
elif ans[0] == -1:
    ans[0] = 1
    
elif ans[1] == -1:
  if n == 2:
    ans[1] = 1
  else:
    ans[1] = 0
    
elif ans[2] == -1:
  ans[2] = 0
  

total = ans[2] + ans[1] * 10 + ans[0] * 100

print(total)

Fixed submission:
n,m = list(map(int,input().split()))
ans = [-1] * n
total = 0
  
for i in range(m):
  s,c = list(map(int,input().split()))
  if ans[s-1] != -1 and ans[s-1] != c:
    print(-1)
    exit()
  
  else:
    ans[s-1] = c
  
if ans[0] == 0 and n >= 2:
  print(-1)
  exit()
  
elif ans[0] == -1 and n >= 2:
  ans[0] = 1
  
for i in range(n):
  if ans[i] == -1:
    ans[i] = 0
    
a = 0  
for i in range(n-1, -1, -1):
  total += ans[i] * 10**a
  a += 1

print(total)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
s = [input() for i in range(n)]
s2 = list(set(s))
ans = []

for i in s2:
  ans.append([s.count(i),i])
ans.sort()
sai = max(ans)

for i in range(len(ans)):
  if ans[i][0] == sai[0]:
    print(ans[i][1])

Fixed submission:
import collections
n = int(input())
s = [input() for i in range(n)]
s = collections.Counter(s)
m = 0
ans = []

for i in s.values():
  m = max(m,i)

for k, j in s.items():
  if j == m:
    ans.append(k)
ans.sort()

for i in range(len(ans)):
  print(ans[i])
#print(*ans, sep = "\n")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = [input() for i in range(n)]
i = 0
count, yo, list_yo = [], [], []

while not(x == []):
  a = x.count(x[i])
  count.append(a)
  yo.append(x[i])
  x.remove(x[i])
  if len(x) < max(count):
    break
  
[list_yo.append(yo[k]) for k, c in enumerate(count) if c == max(count)]
  
list_yo.sort()

[print(list_yo[i]) for i in range(len(list_yo))]
  



Fixed submission:
import collections
n = int(input())
s = [input() for i in range(n)]
s = collections.Counter(s)
m = 0
ans = []

for i in s.values():
  m = max(m,i)

for k, j in s.items():
  if j == m:
    ans.append(k)
ans.sort()

for i in range(len(ans)):
  print(ans[i])
#print(*ans, sep = "\n")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = [input() for i in range(n)]
i = 0
count, yo, list_yo = [], [], []

while not(x == []):
  a = x.count(x[i])
  count.append(a)
  yo.append(x[i])
  x.remove(x[i])
  if len(x) < max(count):
    break
  
for k, c in enumerate(count):
  if c == max(count):
    list_yo.append(yo[k])

list_yo.sort()
for i in range(len(list_yo)):
   print(list_yo[i])



Fixed submission:
import collections
n = int(input())
s = [input() for i in range(n)]
s = collections.Counter(s)
m = 0
ans = []

for i in s.values():
  m = max(m,i)

for k, j in s.items():
  if j == m:
    ans.append(k)
ans.sort()

for i in range(len(ans)):
  print(ans[i])
#print(*ans, sep = "\n")

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = [input() for i in range(n)]
i = 0
count, yo, list_yo = [], [], []

while not(x == []):
  a = x.count(x[i])
  count.append(a)
  yo.append(x[i])
  x.remove(x[i])
  
for k, c in enumerate(count):
  if c == max(count):
    list_yo.append(yo[k])

list_yo.sort()
for i in range(len(list_yo)):
   print(list_yo[i])



Fixed submission:
import collections
n = int(input())
s = [input() for i in range(n)]
s = collections.Counter(s)
m = 0
ans = []

for i in s.values():
  m = max(m,i)

for k, j in s.items():
  if j == m:
    ans.append(k)
ans.sort()

for i in range(len(ans)):
  print(ans[i])
#print(*ans, sep = "\n")
Buggy python submission (verdict: Runtime Error):
n,m=list(map(int,input().split()))
ac,wa=0,0
aclis=[0]*n
walis=[0]*n

for i in range(m):
  p,s=input().split()
  p = int(p)  
  if s == "AC" and aclis[p-1] == 0:
    aclis[p-1] = 1
    ac += 1
    wa += wa[p-1]
  elif s == "WA" and aclis[p-1] == 0:
    wa[p-1] += 1
print(ac,wa)

Fixed submission:
n,m=list(map(int,input().split()))
ac,wa=0,0
aclis=[0]*n
walis=[0]*n

for i in range(m):
  p,s=input().split()
  p = int(p)  
  if s == "AC" and aclis[p-1] == 0:
    aclis[p-1] = 1
    ac += 1
    wa += walis[p-1]
  elif s == "WA" and aclis[p-1] == 0:
    walis[p-1] += 1
print(ac,wa)
Buggy python submission (verdict: Runtime Error):
a,b = list(map(int,input().split()))

if a >= 10 or b >= 10:
  print(-1)
else:
  print(a*b)


Fixed submission:
r = int(input())

print(r**2)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for i in range(n)]

for i in range(n):
  if i == 0:
    ans = max(a[1:n])
  elif i == n-1:
    ans = max(a[0:n-1])
  else:
    ans = max(a[0:i],a[i+1:n])
  print(ans)

Fixed submission:
n = int(input())
a = [int(input()) for i in range(n)]

sot = sorted(a,reverse = True)
ans1 = sot[0]
ans2 = sot[1]

for i in a:
  if i != ans1:
    print(ans1)
  else:
    print(ans2)
Buggy python submission (verdict: Runtime Error):
s = list(input())
s.sort()
if s[0] == s[1] and s[2] == s[3] and a[1] != a[2]:
  print("Yes")
else:
  print("No")

Fixed submission:
s = list(input())
s.sort()
if s[0] == s[1] and s[2] == s[3] and s[1] != s[2]:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
N=input()
A=list(input().split(" "))
for n in range(1,int(N)):
    print(A.count(n))


Fixed submission:
print(float(input())*2*3.14)

Buggy python submission (verdict: Runtime Error):
a,b=input().split()
c,d=input().split()
a=int(a)
b=int(b)
c=int(c)
d=int(d)
play_day=a-(b+c)
if play_day>=0:
    print(play_day)
else:
    print("-1")

Fixed submission:
print(float(input())*2*3.14)

Buggy python submission (verdict: Runtime Error):
N,A=int(input()),input().split(" ")
for n in range(1,N):
    print(A.count(str(n)))

Fixed submission:
print(float(input())*2*3.14)
Buggy python submission (verdict: Runtime Error):
K = int(input("multiple of: "))
A = int(input("From A: "))
B = int(input("To B: "))
word = "NG"
for i in range(A, B+1):
    if i % K == 0:
        word = "OK"
print(word)


Fixed submission:
K = int(input())
A, B = map(int, input().split())
word = "NG"
for i in range(A, B+1):
    if i % K == 0:
        word = "OK"
print(word)

Buggy python submission (verdict: Runtime Error):
K = int(input("multiple of: "))
A = int(input("From A: "))
B = int(input("To B:"))
for i in range(1, 1000):
    M = K * i
    if M in range(A, B):
        print("OK")
        break
    elif i == 100 and M not in range(A, B):
        print("NG")
    else: 
        continue


Fixed submission:
K = int(input())
A, B = map(int, input().split())
word = "NG"
for i in range(A, B+1):
    if i % K == 0:
        word = "OK"
print(word)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
daytofinish = sum(A)
if N-daytofinish < 0:
    print(-1)
else:
    print(N-daytofinish)

Fixed submission:
import math
R = int(input(""))
C = 2 * math.pi * R
print(C)

Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
daystofinish = sum(A)
print(N-daystofinish)
N, M = map(int, input().split())
A = list(map(int, input().split()))
daystofinish = sum(A)
if N-daystofinish < 0:
    print(-1)
else:
    print(N-daystofinish)

Fixed submission:
import math
R = int(input(""))
C = 2 * math.pi * R
print(C)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())
A = list(map(int, input().split()))
daystofinish = sum(A)
print(N-daystofinish)
N, M = map(int, input().split())
A = list(map(int, input().split()))
daystofinish = sum(A)
if N-daystofinish < 0:
    print(-1)
else:
    print(N-daystofinish)

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

x = n - sum(a)
print(x if x >= 0 else -1)

Buggy python submission (verdict: Runtime Error):
import math
R = int(input(""))
C = 2 * math.pi * R
print(C)

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

x = n - sum(a)
print(x if x >= 0 else -1)
Buggy python submission (verdict: Time Limit Exceeded):
def main():
    N = int(input())
    S = input()

    ans = 0
    for k in range(N):
        for j in range(k):
            for i in range(j):
                if j-i != k-j:
                    if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
                        ans+=1
    print(ans)
main()

Fixed submission:
def main():
    N = int(input())
    S = input()

    ans = S.count('R') * S.count('G') * S.count('B')

    for i in range(N):
        for j in range(i+1, N):
            k = j + j - i
            if k < N:
                if S[i]!=S[j] and S[j]!=S[k] and S[k]!=S[i]:
                    ans-=1
    print(ans)
main()