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

Fixed submission:
n = int(input())
a = []
for i in range(n):
	a.append([int(n) for n in input().split()])
	a[i][0], a[i][2] = a[i][2], a[i][0]
a = sorted(a)
for x in range(101):
	for y in range(101):
		h = a[n - 1][0] + abs(x - a[n - 1][2]) + abs(y - a[n - 1][1])
		for k in range(n):
			d = h - abs(x - a[k][2]) - abs(y - a[k][1])
			if a[k][0] != max(d, 0):
				break
			if k == n - 1:
				print(x, y, h)
				exit()

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
b = []
flag = 0
for i in range(n):
	a.append([int(n) for n in input().split()])
	a[i][0], a[i][2] = a[i][2], a[i][0]
a = sorted(a)
for i in range(0, 101):
	for j in range(0,101):
		h = a[0][0] + abs(i - a[0][2]) + abs(j - a[0][1])
		for k in range(n):
			d = h - abs(i - a[k][2]) - abs(j - a[k][1])
			if (d >= 0 and d != a[k][0]) or (d < 0 and a[k][0] != 0):
				break
			if k == n - 1:
				b.append(i)
				b.append(j)
				b.append(h)
print(b[0], b[1], b[2])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
b = []
flag = 0
for i in range(n):
	a.append([int(n) for n in input().split()])
	a[i][0], a[i][2] = a[i][2], a[i][0]
a = sorted(a)
for i in range(0, 101):
	if flag == 1:
		break
	for j in range(0,101):
		if flag == 1:
			break
		h = a[0][0] + abs(i - a[0][2]) + abs(j - a[0][1])
		for k in range(n):
			d = h - abs(i - a[k][2]) - abs(j - a[k][1])
			if (d >= 0 and d != a[k][0]) or (d < 0 and a[k][0] != 0):
				break
			if k == n - 1:
				b.append(i)
				b.append(j)
				b.append(h)
				flag = 1
print(b[0], b[1], b[2])

Buggy submission (verdict: Runtime Error):
n = int(input())
a = []
b = []
flag = 0
for i in range(n):
	a.append([int(n) for n in input().split()])
	a[i][0], a[i][2] = a[i][2], a[i][0]
a = sorted(a)
for i in range(0, 101):
	if flag == 1:
		break
	for j in range(0,101):
		if flag == 1:
			break
		h = a[0][0] + abs(i - a[0][2]) + abs(j - a[0][1])
		for k in range(n):
			d = h - abs(i - a[k][2]) - abs(j - a[k][1])
			if (d >= 0 and d != a[k][0]) or (d < 0 and a[k][0] == 0):
				break
			if k == n - 1:
				b.append(i)
				b.append(j)
				b.append(h)
				flag = 1
print(b[0], b[1], b[2])
Problem p02921 (python)

Fixed submission:
S=input()
T=input()
if len(S)>3 or len(S) < 1 or len(T)>3 or len(T) < 1:
  sys.exit()

a = 0
if S[0] == T[0]:
  a += 1
if S[1] == T[1]:
  a += 1
if S[2] == T[2]:
  a += 1

print(a)

Buggy submission (verdict: Runtime Error):
    l = list(map(int, input().split()))
     
    if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
    	sys.exit()
     
    a = 0
    while l[0] <= l[1]:
    	l[1] = l[1] - l[0]
    	a += 1
    print(a)

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

if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()


a = 1
while l[0] < l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)

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

if l[0]<2 or l[0]>20 or l[1]<1 or l[1]>20:
	sys.exit()

a = 0
while l[0] <= l[1]:
	l[1] = l[1] - l[0]
	a += 1
print(a)
Problem p02922 (python)

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

if A<2 or A>20 or B<1 or B>20:
	exit()

if B == 1:
	print(0)
	exit()

a = 1
while A < B:
	B = B - A + 1 
	a += 1
print(a)

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

if A<2 or A>20 or B<1 or B>20:
	sys.exit()

if B == 1:
	print(0)
	sys.exit()

a = 1
while A < B:
	B = B - A
	a += 1
print(a)
Problem p02921 (python)

Fixed submission:
S = list(input())
T = list(input())

count = 0
for i in range(3):
    if S[i] == T[i]:
        count+=1
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

S = S.split()
T = T.split()

count = 0
for i in range(3):
  if S[i]==T[i]:
    count+=1
print count
Problem p02921 (python)

Fixed submission:
a = [input().split() for l in range(2)]
forecast = list(str(a[0]))
real = list(str(a[1]))
count = 0
if forecast[2] == real[2]:
  count = count + 1
if forecast[3] == real[3]:
  count = count + 1
if forecast[4] == real[4]:
  count = count + 1
 
print(str(count))

Buggy submission (verdict: Runtime Error):
a = [input().split() for l in range(2)]
count = 0
if a[0][0] == a[1][0]:
  count = count + 1
if a[0][1] == a[1][1]:
  count = count + 1
if a[2][0] == a[2][0]:
  count = count + 1
 
print(count)

Buggy submission (verdict: Runtime Error):
a = [input().split() for l in range(3)]
count = 0
if a[0][0] == a[1][0]:
  count = count + 1
if a[0][1] == a[1][1]:
  count = count + 1
if a[2][0] == a[2][0]:
  count = count + 1

print(count)
Problem p02922 (python)

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

tap = int(i[0])
need = int(i[1])
count = 1
needed_tap = 0
while count < need:
  count = count + (tap - 1)
  needed_tap = needed_tap +1
 
print(str(needed_tap))

Buggy submission (verdict: Runtime Error):
a = [input().split() for l in range(1)]
tap = a[0]
need = a[1]
count = 1
needed_tap = 0
while count < need:
  count = count + (tap - 1)
  needed_tap = needed_tap +1

print(str(needed_tap))
Problem p02957 (python)

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

if (int(A)+int(B))%2 == 1:
    print("IMPOSSIBLE")
else:
    print(int((int(A)+int(B))/2))

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

if (int(A)+int(B))%2 == 1:
    print(IMPOSSIBLE)
else:
    print(int((int(A)+int(B))/2))
Problem p02921 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = [int(c) for c in input().split(' ')]
num = 0
bdash = b
if b == 1:
    num = 0
    bdash = -1
while bdash > 0:
    if bdash == a:
        num = num+1
        break
    elif bdash > a:
        num = num+1
        bdash = bdash - (a - 1)
    elif bdash < a:
        num = num + 1
        break
print(num)
Problem p03433 (python)

Fixed submission:
n = int(input())
a = int(input())

rest = n % 500
if rest <= a :
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
c = []
for i in range(3):
    c.append([int(c) for c in input().split(' ')])
result = 'No'
for a1 in range(0, 101):
    for a2 in range(0, 101):
        for a3 in range(0, 101):
            if ((a1 - a2 == c[0][0]+c[0][1]+c[0][2]
            - c[1][0]- c[1][1] - c[1][2])
             and (a1-a3 == c[0][0]+c[0][1]+c[0][2]
             -c[2][0]- c[2][1] - c[2][2])
             and (a2 - a3 == c[1][0]+ c[1][1] + c[1][2]
             - c[2][0] - c[2][1] - c[2][2]
             )):
                result = 'Yes'
                break
print(result)

Buggy submission (verdict: Runtime Error):
c = []
for i in range(3):
    c.append([int(c) for c in input().split(' ')])
result = 'No'
for a1 in range(0, 101):
    for a2 in range(0, 101):
        for a3 in range(0, 101):
            if ((a1 - a2 == c[0][0]+c[0][1]+c[0][2]
            - c[1][0]- c[1][1] - c[1][2])
             and (a1-a3 == c[0][0]+c[0][1]+c[0][2]
             -c[2][0]- c[2][1] - c[2][2])
             and (a2 - a3 == c[1][0]+ c[1][1] + c[1][2]
             - c[2][0] - c[2][1] - c[2][2]
             )):
                result = 'Yes'
                break
            else:
              continue
                  
print(result)

Buggy submission (verdict: Runtime Error):
c = []
for i in range(3):
    c.append([int(c) for c in input().split(' ')])
result = 'No'
for a1 in range(0, 201):
    for a2 in range(0, 201):
        for a3 in range(0, 201):
            if ((a1 - a2 == c[0][0]+c[0][1]+c[0][2]
            - c[1][0]- c[1][1] - c[1][2])
             and (a1-a3 == c[0][0]+c[0][1]+c[0][2]
             -c[2][0]- c[2][1] - c[2][2])
             and (a2 - a3 == c[1][0]+ c[1][1] + c[1][2]
             - c[2][0] - c[2][1] - c[2][2]
             )):
                result = 'Yes'
                break
print(result)
Problem p03485 (python)

Fixed submission:
a,b = [int(c) for c in input().split(' ')]
carry = (a+b)%2
print(int((a+b)/2) + carry)

Buggy submission (verdict: Runtime Error):
a,b = [int(c) for c in input().split{' '}]
print((a+b-1)/2)

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

Fixed submission:
a,b,c = [int(c) for c in input().split(' ')]
i = a * 100 + b * 10 + c
if i % 4 == 0:
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
a,b.c = [int(c) for c in input()]
i = c * 100 + b * 10 + a
if i % 4 == 0:
  print('YES')
else:
  print('NO')
Problem p02921 (python)

Fixed submission:
S = input()
T = input()

i = 0
result = 0
for item in [0,0,0]:
    if S[i] == T[i]:
        result += 1
    i += 1

print(result)

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

i = 0
reslt = 0
for item in S:
    if S[i] == T[i]:
        reslt += 1
    i += 1

print(result)
Problem p03043 (python)

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

array = []
for i in range(N):
    n = i+1
    nankai = 0
    while n < K:
        n = n * 2
        nankai += 1
    array.append(nankai)

kakus = 0
for k in array:
    kaku = 1 / N
    for q in range(k):
        kaku = kaku / 2
    kakus += kaku

print(kakus)

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

array = []
for i in range(N):
    n = i+1
    nankai = 0
    while n < K:
        n = n * 2
        nankai += 1
    array.append(nankai)

kakus = 0
for k in array:
    kaku = 1 / N
    for q in range(k):
        kaku = kaku / 2
    kakus += kaku

print(kakus)
Problem p02921 (python)

Fixed submission:
s = input()
t = input()

cnt = 0
for i in range(len(s)):
     if s[i] == t[i]:
            cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int, input().split())
if b != 1:
    if b> a:
        print(math.ceil((b-a)/(a-1)+1))
    else:
        print(math.ceil(b/a))
else:
    print(0)
Problem p02924 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000) 

n = int(input())
print(n*(n-1)//2)

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000) 

n = int(input())
li1 = list(range(n))
print(sum(li1))

Buggy submission (verdict: Runtime Error):
n = int(input())
li1 = list(range(n))
print(sum(li1))
Problem p02937 (python)

Fixed submission:
s = input()
t = input()

idx = -1
count = 0

if set(t) <= set(s):
    for i in t:
        idx = s.find(i, idx+1)
        if idx == -1:
            idx = s.find(i)
            count += 1
    pdc = count * len(s)
    total_idx = (idx + 1) + pdc 
    print(total_idx)
else:
    print(-1)

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

idx = -1
if set(t) <= set(s):
    for i in t:
        idx = s.find(i, idx+1)
        s += s
    print(idx+1)
else:
    print(-1)

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

idx = -1
if set(t) <= set(s):
    for i in t:
        idx = strings.find(i, idx+1)
    print(idx+1)
else:
    print("-1")

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

strings = s*len(t)

for str in t:
    if str not in s:
        print("-1")
        break
    strings.strip(str)

n = strings.index(t)
num = len(s)*(n-1)+(s.index(t[-1]))+1

print(num)
Problem p03377 (python)

Fixed submission:
a, b, x = map(int, input().split())
if x >= a and x <= a + b:
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):

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

N = max(a)

li = [abs(N/2 - k) for k in a]
index = li.index(min(li))

print("{0} {1}".format(N, a[index]))
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
B = N % 500

if A >= B :
    print('Yes')

else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
a_i = []
for i in range(N):
    a_i.append(int(input()))

x = []
y = []

if N%2==0:
    for j in range(int(N/2)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        y.append(max(a_i))
        a_i.remove(max(a_i))

else:
    for j in range(int((N/2)+1)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        if a_i == []:
            break
        y.append(max(a_i))
        a_i.remove(max(a_i))

X = sum(x)
Y = sum(y)


if X >= Y:
    print(X - Y)

else:
    print(Y - X)
Problem p03434 (python)

Fixed submission:
N = int(input())
a_i = list(map(int, input().split(" ")))
 
x = []
y = []
 
if N%2==0:
    for j in range(int(N/2)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        y.append(max(a_i))
        a_i.remove(max(a_i))
 
else:
    for j in range(int((N/2)+1)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        if a_i == []:
            break
        y.append(max(a_i))
        a_i.remove(max(a_i))
 
X = sum(x)
Y = sum(y)
 
 
if X >= Y:
    print(X - Y)
 
else:
    print(Y - X)

Buggy submission (verdict: Runtime Error):
N = int(input())
a_i = list(map(int, input().split('')))
 
x = []
y = []
 
if N%2==0:
    for j in range(int(N/2)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        y.append(max(a_i))
        a_i.remove(max(a_i))
 
else:
    for j in range(int((N/2)+1)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        if a_i == []:
            break
        y.append(max(a_i))
        a_i.remove(max(a_i))
 
X = sum(x)
Y = sum(y)
 
 
if X >= Y:
    print(X - Y)
 
else:
    print(Y - X)

Buggy submission (verdict: Runtime Error):
N = int(input())
a_i = []
for i in range(N):
    a_i.append(int(input()))

x = []
y = []

if N%2==0:
    for j in range(int(N/2)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        y.append(max(a_i))
        a_i.remove(max(a_i))

else:
    for j in range(int((N/2)+1)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        if a_i == []:
            break
        y.append(max(a_i))
        a_i.remove(max(a_i))

X = sum(x)
Y = sum(y)


if X >= Y:
    print(X - Y)

else:
    print(Y - X)

Buggy submission (verdict: Runtime Error):
N = int(input())
a_i = []
for i in range(N):
    a_i.append(int(input()))

x = []
y = []

if N%2==0:
    for j in range(int(N/2)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        y.append(max(a_i))
        a_i.remove(max(a_i))

else:
    for j in range(int((N/2)+1)):
        x.append(max(a_i))
        a_i.remove(max(a_i))
        if a_i == []:
            break
        y.append(max(a_i))
        a_i.remove(max(a_i))

X = sum(x)
Y = sum(y)


if X >= Y:
    print(X - Y)

else:
    print(Y - X)
Problem p03447 (python)

Fixed submission:
X=int(input())
A=int(input())
B=int(input())

Y=(X-A)%B
print(Y)

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

if x%500==0 and x%100==0:
    print((x//500)+(x//100)+1)
elif  x%500!=0 and x%100==0:
    print((x//100)+1)
else:
    print(1)
Problem p03455 (python)

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

print("Odd" if(a % 2 == 1 and b % 2 == 1) else "Even")

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

print("Odd" if(a % 2 == 1 and b % 2 == 1) else "Even")
Problem p02923 (python)

Fixed submission:
import sys
N = int(input())
H = list(map(int, input().split()))
ans = []
count = 0
if N == 1:
    print(0)
    sys.exit()
for i in range(N-1):
    if H[i] < H[i+1]:
        count = 0
    else:
        count += 1
    ans.append(count)
print(max(ans))

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = []
count = 0
for i in range(N-1):
    if H[i] < H[i+1]:
        count = 0
    else:
        count += 1
    ans.append(count)
print(max(ans))
Problem p03110 (python)

Fixed submission:
XU=list(input().split() for i in range(int(input())))
print(sum([float(x)*{"JPY":1,"BTC":380000}[u] for x,u in XU]))

Buggy submission (verdict: Runtime Error):
N = int(input())
XU=list(input().split() for i in range(int(input())))
print(sum([float(x)*{"JPY":1,"BTC":380000}[u] for x,u in XU]))

Buggy submission (verdict: Runtime Error):
N = int(input())
XU=list(input().split() for i in range(input()))
print(sum([float(x)*{"JPY":1,"BTC":380000}[u] for x,u in XU]))
Problem p03220 (python)

Fixed submission:
N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))
ans= 0
tmp = 100000
for i in range(N):
    s = T - H[i]*0.006
    if tmp > abs(A - s):
        tmp = abs(A - s )
        ans = i + 1
print(ans)

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

for i in N:
    s = T - H(i)*0.006
    ans = min(A-s,ans) 
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
T, A = map(int, input().split())
H = list(map(int,input().split()))
ans = 100
for i in N:
    s = T - i*0.006
    ans = min(A-s,ans) 
print(ans)
Problem p03308 (python)

Fixed submission:
N = input()
A=sorted(map(int,input().split()),reverse = True)
s = A[0]-A[-1]
print(s)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split())
ans = -100
for i in range(N):
    for j in range(i, N):
         s = abs(A[i] - A[j])
         ans = max(ans, s)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split())
ans = -100
for i in range(N):
  for j in range(i, N):
    s = abs(A[i] - A[j])
    ans = max(ans, s)
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split())
ans = 0
for i in range(N):
  for j in range(i, N):
    s = abs(A[i] - A[j])
    ans = max(ans, s)
print(ans)
Problem p03338 (python)

Fixed submission:
n=int(input())
s=input()
ans = []
for i in range(n):
    ans.append(len(set(s[:i])&set(s[i:])))
print(max(ans))

Buggy submission (verdict: Runtime Error):
n=int(input())
s=input()
for i in range(n):
    print(max(len(set(s[:i])&set(s[i:]))))
Problem p03543 (python)

Fixed submission:
n=input()
print("Yes" if n[0]==n[1]==n[2] or n[3]==n[1]==n[2] else "No")

Buggy submission (verdict: Runtime Error):
n=input()
print("Yes" if n[0]==n[1]==n[2] elif  n[3]==n[1]==n[2] else "No")
Problem p03624 (python)

Fixed submission:
letters="abcdefghijklmnopqrstuvwxyz"
ans=sorted(set(letters)^set(input()))
print("None" if len(ans)==0 else ans[0])

Buggy submission (verdict: Runtime Error):
letters="abcdefghijklmnopqrstuvwxyz"
ans=sorted(set(letters)^set(input)())
print("None" if len(ans)==0 else ans[0])
Problem p03644 (python)

Fixed submission:
N = int(input())
p = 0
while(N >=2):
    N = N //2 
    p += 1
print(2**p)

Buggy submission (verdict: Runtime Error):
ans = 10**2
N = int(input())
for i in N:
    p = 0
    while i % 2 == 0:
        i //= 2
        p += 1
    if p < ans:
        ans = p
print(ans)
Problem p02923 (python)

Fixed submission:
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[0]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido+0)
        ido=0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido+0)
        ido=0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1] and i==n-2:
        ans.apppend(ido)
    elif num[i]<num[i+1]:
        ans.append(ido)
        ido=0

print(max(ans))

Buggy submission (verdict: Runtime Error):
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n-1):
    if num[i]>=num[i+1] and i==n-2:
        ans.append(ido+1)
    elif num[i]>=num[i+1]:
        ido=ido+1
    elif num[i]<num[i+1]:
        ans.append(ido)
        ido=0


print(max(ans))

Buggy submission (verdict: Runtime Error):
# sys.stdin.readline()
import sys
input = sys.stdin.readline

n=int(input())
num=list(map(int,input().split()))
ido=0
ans=[]
for i in range(n):
    syoki=num[i]
    for j in range(i+1,n):
        if syoki>=num[j] and not j==n-1:
            syoki=num[j]
            ido=ido+1
        elif syoki>=num[j] and j==n-1:
            ans.append(ido+1)
            ido=0
        elif syoki<num[j] or j==n-1:
            ans.append(ido)
            ido=0
            break

print(max(ans))
Problem p02972 (python)

Fixed submission:
#n=list(map(int,input().split()))
n = int(input()) 
#num = [input() for i in range(n)] 
a=[0]*n    
ama=list(map(int,input().split()))

for i in reversed(ama):
    if sum(a[n-1::n])%2==i:
        next
    else:
        a[n-1]=(a[n-1]+1)%2
    n=n-1


print(sum(a))
print(" ".join(list(map(str,list(map(lambda x: x+1, [i for i, x in enumerate(a) if x == 1]))))))


#for i in range(n):
#    print(max(num[:i]+num[i+1:]))

Buggy submission (verdict: Runtime Error):
#n=list(map(int,input().split()))
n = int(input()) 
#num = [input() for i in range(n)] 
a=[0]*n    
ama=list(map(int,input().split()))

for i in reversed(ama):
    if sum(a[n-1::n])%2==i:
        next
    else:
        a[n-1]=(a[n-1]+1)%2
    n=n-1


print(sum(a))
print(" ".join([i for i, x in enumerate(a) if x == 1]))
#for i in range(n):
#    print(max(num[:i]+num[i+1:]))
Problem p03000 (python)

Fixed submission:
a=list(map(int,input().split()))
n=1
zahyo=0
hane=list(map(int,input().split()))
for i in range(a[0]):
    if zahyo+hane[i]>a[1]:
        break
    else:
        zahyo=zahyo+hane[i]
        n=n+1
print(n)

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

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

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

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a % 2 == 0 or b % 2 == 0:
  return "Even"
else:
  return "Odd"
Problem p03136 (python)

Fixed submission:
numN = int(input())
args = input()
 
lines = list()
 
 
for i in range(numN):
    if i == numN - 1 :
        lines.append(int(args))
        break

    lines.append(int(args[0:args.find(" ")]))
    args = args[args.find(" ") + 1 :]
 
list_sorted = sorted(lines, reverse = True)
max_line = list_sorted[0]
 
for m in range(numN - 1):
    max_line = max_line - list_sorted[m+1]

if max_line < 0 :
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
numN = int(input())
args = input()

lines = list()


for i in range(numN):
    list.append(int(args[0:args.find(" ")]))

list_sorted = list.sorted
max_line = list_sorted[0]

for m in range(numN - 1)
    max_line = max_line - list_sorted[m+1]

if max_line < 0 :
    print(yes)
else
    print(no)
Problem p02945 (python)

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

Buggy submission (verdict: Runtime Error):
a,b=map(int,input().split()))
 
ab1=a+b
ab2=a-b
ab3=a*b
print (max(ab1,ab2,ab3))

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

ab1=a+b
ab2=a-b
ab3=a*b
print (max(ab1,ab2,ab3))