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

Fixed submission:
n = int(input())
nums = [int(input()) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in cnt.values():
    if y % 2 != 0:
        ans += 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
nums = [int(input()) for _ in range(n)]
cnt = {}
ans = 0
for x in nums:
    if x not in cnt:
        cnt[x] = 1
    else:
        cnt[x] += 1
for y in cnt.values():
    if cnt[y] % 2 != 0:
        ans += 1

print(ans)
Problem p03719 (python)

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

if A <= C and C <= B:
    print("Yes")
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]


MPs = {}
for a, b in ABs:
    # この書き方でa,bが取り出せる
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    if mp not in MPs:
        MPs[mp] = '0'

for _, y in sorted(MPs.items()):  # 使わない変数は_とする
    print(y)
Problem p03720 (python)

Fixed submission:
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]
 
 
MPs = {}
for a, b in ABs:
    a = int(a)
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1
 
for mp in range(1, N+1):
    if mp not in MPs:
        MPs[mp] = '0'
 
for _, y in sorted(MPs.items()):
    print(y)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]


MPs = {}
# この書き方でa,bが取り出せる
for a, b in ABs:
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    print(MPs[mp])

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]

MPs = {}
for a, b in ABs:
    # この書き方でa,bが取り出せる
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    print(MPs[mp])

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
ABs = [input().split() for i in range(M)]


MPs = {}
for a, b in ABs:
    # この書き方でa,bが取り出せる
    a = int(a)  # intに直すには先に直しておく
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1

for mp in range(1, N+1):
    print(MPs[mp])
Problem p02658 (python)

Fixed submission:
import sys
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
LIMIT = 10 ** 18
n=int(input())
#a=(int,read.split())
a=[int(i) for i in input().split()]
if 0 in a:
	print(0)
	exit()

ans = 1
for i in a:
	ans *= i
	if ans > LIMIT:
		print(-1)
		exit()
print(ans)

Buggy submission (verdict: Runtime Error):
import numpy as np
#b.py

n=int(input())
a=[int(i) for i in input().split()]
a = np.array(a)
result=1
for i in range(n):
	#a = map(int,input().split())
	result *= a[i]
if result > 1000000000000000000:
	print(-1)
else:
	print(result)

Buggy submission (verdict: Runtime Error):
n,m,c=map(int,input().split())
bli = [int(i) for i in input().split()]
ans=0
for i in range(n):
	a = [int(j) for j in input().split()]
	sum=0
	for k in range(m):
		sum += a[k]*bli[k]
	if sum + c > 0:
		ans += 1

print(ans)
Problem p02756 (python)

Fixed submission:
from collections import deque

s=input()
s=deque(s)
q=int(input())
ans=''
flg=0
for _ in range(q):
	query=list(map(str,input().split()))
	if query[0]=='1':
		flg=1-flg
	else:
		if flg:
			if query[1]=='1':
				s.append(query[2])
			else:
				s.appendleft(query[2])
		else:
			if query[1]=='1':
				s.appendleft(query[2])
			else:
				s.append(query[2])
if flg:
	t=[]
	for i in range(len(s)):
		t.append(s.pop())
	print(''.join(t))
else:
    print(''.join(s))

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

s=input()
s=deque(s)
q=int(input())
ans=''
flg=False
for _ in range(q):
	flg=False
	query=list(map(str,input().split()))
	if query[0]=='1':
		flg=True
	else:
		if flg:
			s.reverse()
		if query[1]=='1':
			s.appendleft(query[2])
		else:
			s.append(query[2])
if flg:
	s=s[::-1]

print(''.join(s))

Buggy submission (verdict: Runtime Error):
#n=int(input())
#n,m=map(int,input().split())
#a=[int(x) for _ in input().split()]

s=input()
q=int(input())
for i in range(q):
    t=list(map(str,input().split()))
    if t[0]=='1':
        s=s[::-1]
    else:
        if t[1]=='1':
            s=t[2]+s
        else:
            s=s+t[2]
    t.clear
print(s)

Buggy submission (verdict: Runtime Error):

#n,m=map(int,input().split())
#a=[int(x) for _ in input().split()]

s=input()
q=int(input())
ans=''
flg=False
for i in range(q):
    t=map(str,input().split())
    if t[0]=='1':
    	flg=True
    else:
		if flg:
			s.reverse()
        if t[1]=='1':
			s=t[2]+s
        else:
            s=s+t[2]
    ans=s
print(s)

Buggy submission (verdict: Runtime Error):

#n,m=map(int,input().split())
#a=[int(x) for _ in input().split()]

s=input()
q=int(input())
ans=''
flg=False
for i in range(q):
    t=map(str,input().split())
    if t[0]=='1':
    	flg=True
    else:
		if flg:
			s.reverse()
        if t[1]=='1':
			s=t[2]+s
        else:
            s=s+t[2]
    ans=s
print(s)
Problem p02760 (python)

Fixed submission:
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
n=int(input())
for i in range(n):
    b=int(input())
    for j in range(3):
        for k in range(3):
            if a[j][k]==b:
               a[j][k]=0
ans='No'
for i in range(3):
    if a[i][0]==a[i][1]==a[i][2]:
        ans='Yes'
    elif a[0][i]==a[1][i]==a[2][i]:
        ans='Yes'
    elif a[0][0]==a[1][1]==a[2][2]:
        ans='Yes'
    elif a[0][2]==a[1][1]==a[2][0]:
        ans='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
n=int(input())

for i in range(n):
	b=int(input())
	for j in range(3):
		for k in range(3):
			if a[j][k]==b:
				a[j][k]=0

ans='No'
for i in range(3):
	if a[i][0]==a[i][1]==[i][2]:
		ans='Yes'
	elif a[0][i]==a[1][i]==a[2][i]:
		ans='Yes'
	elif a[0][0]==a[1][1]==a[2][2]:
		ans='Yes'
	elif a[0][2]==a[1][1]==a[2][0]:
		ans='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
# print("a",a)
# print(a[0][0])
n=int(input())
#print("b:",b)
for i in range(n):
    b=int(input())
	for j in range(3):
		for k in range(3):
			#print("e",e)
			if a[j][k]==b:
				a[j][k]=0
				#print("a:",a)
ans='No'
for i in range(3):
	if a[i][0]==a[i][1]==[i][2]:
		ans='Yes'
	elif a[0][i]==a[1][i]==a[2][i]:
		ans='Yes'
	elif a[0][0]==a[1][1]==a[2][2]:
		ans='Yes'
	elif a[0][2]==a[1][1]==a[2][0]:
		ans='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
# print("a",a)
# print(a[0][0])
n=int(input())
#print("b:",b)
for i in range(n):
    b=int(input())
	for j in range(3):
		for k in range(3):
			#print("e",e)
			if a[j][k]==b:
				a[j][k]=0
				#print("a:",a)
ans='No'
for i in range(3):
	if a[i][0]==a[i][1]==[i][2]:
		ans='Yes'
	elif a[0][i]==a[1][i]==a[2][i]:
		ans='Yes'
	elif a[0][0]==a[1][1]==a[2][2]:
		ans='Yes'
	elif a[0][2]==a[1][1]==a[2][0]:
		ans='Yes'
print(ans)

Buggy submission (verdict: Runtime Error):
#157b
a=[[int(i) for i in input().split()] for _ in range(3)]
# print("a",a)
# print(a[0][0])
n=int(input())
#print("b:",b)
for i in range(n):
    b=int(input())
	for j in range(3):
		for k in range(3):
			#print("e",e)
			if a[j][k]==e:
				a[j][k]=0
				#print("a:",a)
ans='No'
for i in range(3):
	if a[i][0]==a[i][1]==[i][2]:
		ans='Yes'
	elif a[0][i]==a[1][i]==a[2][i]:
		ans='Yes'
	elif a[0][0]==a[1][1]==a[2][2]:
		ans='Yes'
	elif a[0][2]==a[1][1]==a[2][0]:
		ans='Yes'
print(ans)
Problem p02780 (python)

Fixed submission:
n,k=map(int,input().split())
p=[int(x) for x in input().split()]
#さいころの出目の和を集計
for i in range(n):
    p[i]+=1

sdict={}
sdict[0]=p[0]

for i in range(n-1):
	sdict[i+1]=sdict[i]+p[i+1]
j=0
ans=0
if n!=k:
	while (j+k <n):
		dif=sdict[j+k]-sdict[j]
		ans=max(dif,ans)
		j+=1
else:
	ans=sum(p)
print(ans/2)

Buggy submission (verdict: Runtime Error):
n,k=map(int,input().split())
p=[int(x) for x in input().split()]
#さいころの出目の和を集計
for i in range(n):
    p[i]+=1

sdict={}
sdict[0]=p[0]

for i in range(n-1):
	sdict[i+1]=sdict[i]+p[i+1]

j=0
ans=0
while (j+k <=n):
	dif=sdict[j+k]-sdict[j]
	ans=max(dif,ans)
         j+=1
print(ans/2)
Problem p02783 (python)

Fixed submission:

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

count=0
while a >0:
	a -= b
	count+=1
print(count)

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

count=0
while a >0:
	a -= b
	count+=1
print(count)

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

count=0
while a >0:
	a -= b
	count+=1
print(count)
Problem p02784 (python)

Fixed submission:

a,b=map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for at in A:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):

a,b=map(int, input().split())
A = list(map(int, input().split()))
sum = 0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):

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

total = 0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):

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

sum=0
for at in list:
	sum += at
	
	
if a <= sum:
	print("Yes")
else:
	print("No")
Problem p02791 (python)

Fixed submission:
n=int(input())
num=list(map(int,input().split()))
cnt=1
min_n=num[0]
for i in range(1,n):
    if num[i] <= min_n:
        min_n=num[i]
        cnt+=1
print(cnt)

Buggy submission (verdict: Runtime Error):
n=int(input())
num=list(map(int,input().split()))
don=[]
cnt=0
#don.append(num[0])
for i in num:
	flg=True
	for j in don:
		if i > j:
			flg=False
	if flg:
		#don.append(i)
        cnt+=1
print(cnt)
Problem p02812 (python)

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

Buggy submission (verdict: Runtime Error):
N = int(input())
S = input()
print(S.count("ABC")
Problem p02922 (python)

Fixed submission:
a,b = map(int,input().split())
soc=1
for i in range(1,21):
	if i*(a-1)+1 >= b:
		soc = i
		break
if b==1:
	soc=0

print(soc)

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

soc=1
	while a<b :
		soc += 1
		a += a-1
if b==1:
	soc = 0
	
print(soc)
Problem p02934 (python)

Fixed submission:
a=input()
ans=0
n=list(map(int, input().split()))
for i in n:
	ans += 1/i

print(1/ans)

Buggy submission (verdict: Runtime Error):
a=input()
ans=0
n=list(map(int, input().split())
for i in n:
	ans += 1/i

print(1/ans)

Buggy submission (verdict: Runtime Error):
a=int(input())
n=list(int,input().split())
ans=0
for i in n:
  ans += 1/i

print(1/ans)
Problem p02945 (python)

Fixed submission:
import sys
a,b=map(int, input().split())

if a-b > a+b:
    if a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > a+b:
    if a*b > a-b:
        print(a*b)
    else:
        print(a-b)
else:
    print(a+b)

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

if a-b > a+b:
    elif a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > a+b:
    elif a*b > a-b:
        print(a*b)
    else:
        print(a-b)

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

max = a + b

if a-b > max:
    elif a-b > a*b:
        print(a-b)
    else:
        print(a*b)
elif a*b > max:
    elif a*b > a-b:
        print(a*b)
    else:
        print(a-b)

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

max = a + b

if a - b > max:
    print(a-b)
elif a*b > max:
    print(a*b)
else:
    print(max)
Problem p02952 (python)

Fixed submission:
N=int(input())
ans=0
for i in range(1,N+1):
  dig = len(str(i))
  if dig%2 != 0:
    ans +=1
   
print(ans)

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

if 1 <= a < 100:
    if a < 10:
        print(a)
    else:
        print(9)
elif 100 <= a < 10000:
    if a < 1000:
        print(a - 90)
    else:
        print(900 + 9)
elif 10000 <= a < 100000:
    print(a - 9999)
Problem p02969 (python)

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

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

print(3*a**2)

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

print(3*a*a)
Problem p02993 (python)

Fixed submission:
ls = list(input())
flg = False
for i in range(len(ls)-1):
    if ls[i] == ls[i+1]:
        flg=True

if (flg): 
    print('Bad') 
else: 
    print('Good')

Buggy submission (verdict: Runtime Error):
#ls = list(input())
ls = [*input()]
flg = False
for i in range(len(ls)-1):
    if ls[i] == ls[i+1]:
        flg=True

if (flg): 
    print('Bad') 
else: 
    print('Good')
Problem p02999 (python)

Fixed submission:
X, A =map(int, input().split())
if X >= A:
    print(10)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
X, A = map(int, input())
if X >= A:
  print(10)
else:
  print(0)
Problem p03086 (python)

Fixed submission:
s=input()
ans=''
lis=[]
for i in s:
    if i in 'ATGC':
        ans += i
        if i == s[-1]:
            lis.append(len(ans))
    else:
        lis.append(len(ans))
        ans=''

print((max(lis)))

Buggy submission (verdict: Runtime Error):
s=input()
ans=''
lis=[]
for i in s:
    if i in 'ATGC':
        ans += i
    else:
        lis.append(ans)
        ans=''
print(len(max(lis)))
Problem p03238 (python)

Fixed submission:
n=int(input())
if n==1:
	print('Hello World')
	exit()
else:
	a=int(input())
	b=int(input())
	print(a+b)

Buggy submission (verdict: Runtime Error):
n=int(input())
if n==1:
	print('Hello World')
	exit()
else:
	a,b=map(int,input().split())
	print(a+b)
Problem p03407 (python)

Fixed submission:
a,b,c=map(int,input().split())
if a+b>=c:
	print('Yes')
else:
	print('No')

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if a+b=>c:
	print('Yes')
else:
	print('No')
Problem p02657 (python)

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

Buggy submission (verdict: Runtime Error):
import numpy as np
from operator import mul
from functools import reduce
N = int(input().strip())
A = list(map(int,input().split()))
x = reduce(mul, A)
if x > 1000000000000000000:
    print("-1")
else:
    print(x)
Problem p02658 (python)

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
ans = 1
if 0 in lis:
  print(0)
  exit()
for num in lis:
  ans *= num
  if ans > 10 ** 18:
    print(-1)
    exit()
print(ans)

Buggy submission (verdict: Runtime Error):
    import numpy as np
    from operator import mul
    from functools import reduce
    N = int(input().strip())
    A = list(map(int,input().split()))
    x = reduce(mul, A)
    if x > 1000000000000000000:
        print("-1")
    else:
        print(x)

Buggy submission (verdict: Runtime Error):
    import numpy as np
    from operator import mul
    from functools import reduce
    N = int(input().strip())
    A = list(map(int,input().split()))
    x = reduce(mul, A)
    if x > 1000000000000000000:
        print("-1")
    else:
        print(x)

Buggy submission (verdict: Runtime Error):
from operator import mul
from functools import reduce
N = int(input().strip())
A = list(map(int,input().split()))
x = reduce(mul, A)
if x > 1000000000000000000:
    print("-1")
else:
    print(x)
Problem p04043 (python)

Fixed submission:
A,B,C = map(int,input().split())
if A==5 and B==5 and C==7:
    print("YES")
elif A==5 and C==5 and B==7:
    print("YES")
elif C==5 and B==5 and A==7:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
if A=5 and B=5 and C=7:
    print("YES")
elif A=5 and C=5 and B=7:
    print("YES")
elif C=5 and B=5 and A=7:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A,B,C = map(int,input().split())
if (A = 5 or A =7 )and ( B = 5 or B =7 ) and( C = 5 or C = 7 ) and A+B+C=17:
    print("YES")
else:
    print("NO")
Problem p02639 (python)

Fixed submission:
import random

a = input().split()

for i in range(0, len(a)):
  x = int(a[i])
  
  if x == 0:
    print(i+1)
    break

Buggy submission (verdict: Runtime Error):
x, y = input().split()
x = int(x)
y = int(y)

def check(x, y):
    # 動物の可能性を考える
    for i in range(0, x):
        # 2本足,4本足の動物の数
        leg2_animal = i
        leg4_animal = x - leg2_animal
        
        # 全体の足の数を数えてみる
        sum_legs = leg2_animal * 2 + leg4_animal * 4

        if sum_legs == y:
            print("Yes")
            return

    print("No")

check(x,y)
Problem p02691 (python)

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

d = [0] * n

cnt = 0
for i in range(len(l)):
    if i + l[i] + 1 < n:
        d[i + l[i]] += 1
    if i - l[i] + 1 > 0:
        cnt += d[i - l[i]]
print(cnt)

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

lst = [0] * N

ans = 0
for i in range(N):
    if i + 1 + A[i] < n: #iは0から始まるので +1 してあげる
        lst[i + A[i]] += 1
    if i + 1 - A[i] >= 1:
        ans += lst[i - A[i]]

print(ans)

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

lst = [0] * N

ans = 0
for i in range(N):
    if i + 1 + A[i] < n: #iは0から始まるので +1 してあげる
        lst[i + A[i]] += 1
    if i + 1 - A[i] >= 1:
        ans += lst[i + 1 - A[i]]

print(ans)
Problem p02922 (python)

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

if b == 1:
  print('0')
else:
  cnt = 1
  b -= a
  while True:
    if b > 0:
      b -= (a - 1)
      cnt += 1
    else:
      print(cnt)
      break

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

if b == 1:
    print('0')
else:
  	cnt = 1
	b -= a
    while True:
        if b > 0:
            b -= (a - 1)
            cnt += 1
        else:
            print(cnt)
            break

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split())
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break

Buggy submission (verdict: Runtime Error):
a,b=map(int(input().split()))
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
cnt = 1
b -= a
if b == 1:
  print('0')
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    print(cnt)
    break

Buggy submission (verdict: Runtime Error):
a,b=int(input().split())
cnt = 1
b -= a
while True:
  if b > 0:
  	b -= (a - 1)
    cnt += 1
  else:
    break
print(cnt)
Problem p02945 (python)

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

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

Fixed submission:
a=list(input())
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1

Buggy submission (verdict: Runtime Error):
a=list(int(input))
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 3:
    print('Good')
  i += 1

Buggy submission (verdict: Runtime Error):
a=list(int(input))
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 4:
    print('Good')
  i += 1

Buggy submission (verdict: Runtime Error):
a=list(int(input))
i=0
for j in range(1,4):
  if a[i]== a[j]:
    print('Bad')
    break
  elif a[i]!= a[j] and j == 4:
    print('Good')
  else:
    continue
Problem p03059 (python)

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

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

Buggy submission (verdict: Runtime Error):
a = map(int,input().split())
s= a[2] //a[0]
print(s*a[1])
Problem p03485 (python)

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

Buggy submission (verdict: Runtime Error):
print(int(({0} + {1} - 1)//2).format(input().split())

Buggy submission (verdict: Runtime Error):
print(int((a + b - 1)//2))
Problem p03599 (python)

Fixed submission:
A,B,C,D,E,F = map(int,input().split())
W=set()
for a in range(0,F+1,100*A):
    for b in range(0,F+1-a,100*B):
        W.add(a+b)
S=set()
for c in range(0,F+1,C):
    for d in range(0,F+1,D):
        S.add(c+d)
rate = -1
for w in W:
    for s in S:
        if 0 < w+s <= F and s <= w*E//100:
            if s/(w+s) > rate:
                rate = s/(w+s)
                ans = w+s, s
print(ans[0],ans[1])

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

s = set()
t = set()
for i in range(f//100 + 1):
    for j in range(f//100 + 1):
        if 0 < 100 * (a * i + b * j) <= f :
            s.add(100 *(a * i + b * j))

for k in range(0, f + 1, c):
    for l in range(0, f + 1, d):
        if f >= (k + l):
            t.add(k + l)

mi = 0
ans = [0, 0]
for n in s:
    for m in t:
        if 0 < n + m <= f and mi < (100 * m) /(n + m) <= 100 and m <= n * e // 100:
            mi = (100 * m) / (n + m)
            ans = [str(n + m), str(m)]
print(" ".join(ans))

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

s = set()
t = set()
for i in range(f):
    for j in range(f):
        if f >= 100 * (a * i + b * j):
            s.add(100 * (a * i + b * j))
        if f >= (c * i + d * j):
            t.add(c * i + d * j)

m = 0            
ans = [0, 0]
for k in s:
    for l in t:
        if k != 0 and l != 0:
            if k + l <= f and m <= (100*l) / (k + l) and l <= (k//100) * e :
                m = (100 * l) / (k + l)
                ans = [str(k + l), str(l)]
print(" ".join(ans))
Problem p03693 (python)

Fixed submission:


lst = list(input().split())
a = "".join(lst)
print("YES" if int(a) % 4 == 0 else "NO")

Buggy submission (verdict: Runtime Error):
#Rgb Cards

Lst = list(input().split())
a = "".join(lst)
print("YES" if int(a) % 4 == 0 else "NO")

Buggy submission (verdict: Runtime Error):


l = input()
a = " ".join(l)
print("YES" if int(a) % 4 == 0 else "No")
Problem p03852 (python)

Fixed submission:
a=['a','i','u','e','o'];print('cvoonwseoln a n t'[input() in a::2])

Buggy submission (verdict: Runtime Error):
a=input();print('cvoonwseoln a n t'[('a'or'i'or'u'or'e'or'o')in a ::2])a=['a','i','u','e','o'];print('cvoonwseoln a n t'[input() in a::2])
Problem p04044 (python)

Fixed submission:
a,b = map(int,input().split())
s = sorted([input() for x in range(a)])
print(''.join(s))

Buggy submission (verdict: Runtime Error):
a = int(input())
lists = []
for a in range(a):
  s = input()
  lists.append(s)

lists.sort()
print(''.join(lists))