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

Fixed submission:
n,m,q = map(int, input().split())
mmap = [ [ 0 for j in range(n+1) ] for i in range(n+1) ]
for i in range(m):
  s,e = map(int, input().split())
  mmap[s][e] += 1
for i in range(n+1):
  for j in range(1,n+1):
    mmap[i][j] = mmap[i][j] + mmap[i][j-1]
for j in range(n+1):
  for i in range(n-1,0,-1):
    mmap[i][j] = mmap[i][j] + mmap[i+1][j]
for i in range(q):
  s,e = map(int, input().split())
  print(mmap[s][e])

Buggy submission (verdict: Runtime Error):
n,m,q = map(int, input().split())
m_dict = dict()
for i in range(1,m+1):
  m_dict[i] = []
for i in range(m):
  s,e = map(int, input().split())
  m_dict[s].append(e)
for i in range(q):
  s,e = map(int, input().split())
  cnt = 0
  for j in range(s,e+1):
    cnt += len([ k for k in m_dict[j] if k <= e ])
  print(cnt)

Buggy submission (verdict: Runtime Error):
n,m,q = map(int, input().split())
m_dict = dict()
for i in range(1,m+1):
  m_dict[i] = []
for i in range(m):
  s,e = map(int, input().split())
  m_dict[s].append(e)
for i in range(q):
  s,e = map(int, input().split())
  cnt = 0
  for j in m_dict.keys():
    if len(m_dict[j]) == 0: continue
    elif j < s: continue  
    elif e < j: break  
    else: cnt += len([ k for k in m_dict[j] if k <= e ])
  print(cnt)
Problem p03280 (python)

Fixed submission:
l = input().split()
S = 4*(((int(l[0])-1)/2) *((int(l[1])-1)/2))
print(int(S))

Buggy submission (verdict: Runtime Error):
A = int(input())
B = int(input())
S = 4*(((A-1)/2) *((B-1)/2))
print(int(S))
Problem p03361 (python)

Fixed submission:
import sys
h, w = (int(i) for i in input().split())
s =[list(input()) for i in range(h)]
flags = []
for i in range(0,h):
    flags.append([0 for i in range(w)])

for i in range(0,h):
    for j in range(0,w-1):
        if s[i][j]=='#' and s[i][j+1]=='#':
            flags[i][j]=1
            flags[i][j+1]=1

for i in range(0,w):
    for j in range(0,h-1):
        if s[j][i]=='#' and s[j+1][i]=='#':
            flags[j][i]=1
            flags[j+1][i]=1

for i in range(0,h):
    for j in range(0,w):
        if s[i][j]=="#":
            if flags[i][j]==0:
                print("No")
                sys.exit()
            else:
                continue

print("Yes")

Buggy submission (verdict: Runtime Error):
import sys
h, w = (int(i) for i in input().split())
s =[list(input()) for i in range(h)]
flags = []
for i in range(0,h):
    flags.append([0 for i in range(w)])

for i in range(0,h):
    for j in range(0,w-1):
        if s[i][j]=='#' and s[i][j+1]=='#':
            flags[i][j]=1
            flags[i][j+1]=1

for i in range(0,w):
    for j in range(0,h-1):
        if s[j][i]=='#' and s[j+1][i]=='#':
            flags[j][i]=1
            flags[j+1][i]=1

for i in range(0,w):
    for j in range(0,h):
        if s[i][j]=="#":
            if flags[i][j]==0:
                print("No")
                sys.exit()
            else:
                continue

print("Yes")
Problem p03623 (python)

Fixed submission:
x, a, b = (int(i) for i in input().split())
aa = abs(a-x)
bb = abs(b-x)
if aa > bb:
    print("B")
else:
    print("A")

Buggy submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
b = []
for key,val in Counter(a).items():
    if val >= 2:
        b.append(key)
        if val >= 4:
            b.append(key)

b.sort()

if len(b)>=2:
    x = b.pop()
    y = b.pop()
    ans = x*y
else:
    ans = 0

print(ans)
Problem p03624 (python)

Fixed submission:
st = list(input())
ls = list(set(st))
abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
set_ab = set(abc) - set(ls)
ans = list(set_ab)
ans.sort()
if ans:
    print(ans[0])
else:
    print("None")

Buggy submission (verdict: Runtime Error):
import sys

st = list(input())
ls = list(set(st))
ls.sort()
abc = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']
for i in range(0,len(abc)):
    if abc[i] != ls[i]:
        print(abc[i])
        sys.exit()
print("None")
Problem p03676 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
occur = [0 for i in range(n + 1)]
MOD = 1000000007
for i in range(n + 1):
    if occur[a[i]] > 0: val = n - 1 - i + occur[a[i]]
    else: occur[a[i]] = i + 1
inv = [0 if i > 2 else 1 for i in range(n + 2)]
pinv = [0 if i > 2 else 1 for i in range(n + 2)]
perm = [0 if i > 2 else 1 for i in range(n + 2)]
for i in range(2, n + 2):
    inv[i] = -int(MOD / i) * inv[MOD % i] + MOD
    pinv[i] = pinv[i - 1] * inv[i] % MOD
    perm[i] = perm[i - 1] * i % MOD
def C(n, m):
    return (perm[m] * pinv[n] % MOD) * pinv[m - n] % MOD if n <= m else 0
for i in range(1, n + 2):
    temp = C(i, n + 1) - C(i - 1, val)
    if temp < 0: temp += MOD
    print(temp)

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

n=int(input())
s=[int(i) for i in input().split()]
div=int(10**9+7)
c = Counter(s)
j=-1
for i in range(1, n + 1):
    if c[i] == 2:
        j = i
        break
a, b = [i for i in range(n + 1) if s[i] == j]

f=[1]
t=1
for i in range(1,n+2):
    t=t*i
    f.append(t)


for i in range(1,n+2):
    x=round(f[n+1]/(f[i]*f[n+1-i]))
    y=round(f[a+n-b]/(f[i-1]*f[a+n-b-i+1]))
    ans=(x-y)%div
    print(ans)
Problem p03846 (python)

Fixed submission:
n = int(input())
a = sorted([int(i) for i in input().split()])
mod = 10**9+7
if n%2==0:
    able = []
    for i in range(1,n,2):
        able.append(i)
        able.append(i)
else:
    able = [0]
    for i in range(2,n,2):
        able.append(i)
        able.append(i)

if a == able:
    r = n//2
    ans = 1
    for i in range(0,r):
        ans = ans * 2 % mod
    print(int(ans))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
n = int(input())
a = sorted([int(i) for i in input().split()])
mod = 10e9+7
if n%2==0:
    able = []
    for i in range(1,n,2):
        able.append(i)
        able.append(i)
else:
    able = [0]
    for i in range(2,n,2):
        able.append(i)
        able.append(i)

if a == able:
    r = n//2
    ans = 2**r % mod
    print(int(ans))
else:
    print(0)
Problem p03238 (python)

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print("{0}".format(a + b))

Buggy submission (verdict: Runtime Error):
total = [int(i) for i in input().split()]
n = total[0]
time_limit = total[1]

ci = []
ti = []
for i in range(n):
    list = [int(j) for j in input().split()]
    ci.append(list[0])
    ti.append(list[1])

min = 1000
for i in range(len(ci)):
    if ci[i] < min and ti[i] < time_limit:
        min = ci[i]

if min != 1000:
    print(min)
else:
    print("TLE")

Buggy submission (verdict: Runtime Error):
total = [int(i) for i in input().split()]
n = total[0]
time_limit = total[1]

ci = []
ti = []
for i in range(n):
    list = [int(j) for j in input().split()]
    ci.append(list[0])
    ti.append(list[1])

min = 100
update = 0
for i in range(len(ci)):
    if ci[i] <= min and ti[i] <= time_limit:
        min = ci[i]
        update = 1

if update == 1:
    print(min)
else:
    print("TLE")
Problem p03243 (python)

Fixed submission:
n = int(input()) # 入力を受け付ける
match = 0

if 100 <= n and n <= 111:
    match = 111
elif 112 <= n and n <= 222:
    match = 222
elif 223 <= n and n <= 333:
    match = 333
elif 334 <= n and n <= 444:
    match = 444
elif 445 <= n and n <= 555:
    match = 555
elif 556 <= n and n <= 666:
    match = 666
elif 667 <= n and n <= 777:
    match = 777
elif 778 <= n and n <= 888:
    match = 888
elif 889 <= n and n <= 999:
    match = 999

print(match)

Buggy submission (verdict: Runtime Error):
p_100 = n // 100
tmp = n % 100
p_10 = tmp // 10
p_1 = tmp % 10
if p_100 == p_10:
    if p_10 == p_1:
        print(str(p_1) * 3)
    elif p_10 <= p_1:
        print(str(p_10+1) * 3)
    elif p_10 >= p_1:
        print(str(p_10) * 3)
elif p_100 <= p_10:
    print(str(p_100+1) * 3)
elif p_100 >= p_10:
    print(str(p_100) * 3)
Problem p03316 (python)

Fixed submission:
def cal(n):
  ans = 0
  while n != 0:
    ans += n % 10
    n /= 10
  return ans

n = int(raw_input())
if n % cal(n) == 0:
  print "Yes"
else:
  print "No"

Buggy submission (verdict: Runtime Error):
def cal(n):
  ans = 0
  while n != 0:
    ans += n % 10
    n /= 10
  return n

n = int(raw_input())
if n % cal(n) == 0:
  print "Yes"
else:
  print "No"
Problem p03447 (python)

Fixed submission:
l = [int(raw_input()) for _ in range(3)]
print (l[0] - l[1]) % l[2]

Buggy submission (verdict: Runtime Error):
l = [int(raw_input()) for _ in range(3)]
print (l[0] - l[[1]) % l[2]
Problem p03463 (python)

Fixed submission:
n,a,b = map(int, raw_input().split())
if (b-a) % 2 == 0:
  print "Alice"
else:
  print "Borys"

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, raw_input().split()
if (b-a) % 2 == 0:
  print "Alice"
else:
  print "Borys"
Problem p03487 (python)

Fixed submission:
from collections import Counter

n = int(raw_input())
c = Counter(map(int, raw_input().split()))
s = 0
for k,v in c.items():
    if v < k:
        s += v
    else:
        s += v - k
print s

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

n = int(raw_input())
c = Counter(map(int, raw_input().split()))
s = 0
for k,v in c:
    if v < k:
        s += v
    else:
        s += v - k
print s
Problem p03501 (python)

Fixed submission:
n,a,b = map(int, raw_input().split())
print(min(n*a, b))

Buggy submission (verdict: Runtime Error):
n,a,b = map(int, raw_input().split())
print(min(n*a, b))
Problem p03502 (python)

Fixed submission:
n = raw_input()
if int(n) % sum(map(int, list(n))) == 0:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
n = raw_input()
if int(n) % sum(map(int, list(n))) == 0:
  print('YES')
else:
  print('NO')
Problem p03557 (python)

Fixed submission:
n = int(raw_input())
al = map(int, raw_input().split())
bl = map(int, raw_input().split())
cl = map(int, raw_input().split())
al.sort()
bl.sort()
cl.sort()
l = [(0,0) for _ in range(n)]
p = 0
for i, b in enumerate(bl):
    while p < n and cl[p] <= b:
        p += 1
    l[i] = (b, n-p)
p = n-1
s = 0
t = 0
for a in al[::-1]:
    while p >= 0 and l[p][0] > a:
        s += l[p][1]
        p -= 1
    t += s
print t

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
al = map(int, raw_input().split())
bl = map(int, raw_input().split())
cl = map(int, raw_input().split())
al.sort()
bl.sort()
cl.sort()
l = [(0,0) for _ in range(n)]
p = 0
for i, b in enumerate(bl):
    while cl[p] <= b:
        p += 1
    l[i] = (b, n-p)
p = n-1
s = 0
t = 0
for a in al[::-1]:
    while p >= 0 and l[p][0] > a:
        s += l[p][1]
        p -= 1
    t += s
print t
Problem p03599 (python)

Fixed submission:
a,b,c,d,e,f = map(int,raw_input().split())
lim = f
f /= 100
wl = [False for _ in range(f+1)]
sl = [False for _ in range(f*e+1)]
if a <= f:
    wl[a] = True
if b <= f:
    wl[b] = True
if c <= f*e:
    sl[c] = True
if d <= f*e:
    sl[d] = True

for i in range(f):
    if wl[i] and i+a <= f:
        wl[i+a] = True
    if wl[i] and i+b <= f:
        wl[i+b] = True

for i in range(f*e):
    if sl[i] and i+c <= f*e:
        sl[i+c] = True
    if sl[i] and i+d <= f*e:
        sl[i+d] = True

maxd = 0.0
maxw = a*100
maxs = 0
for i,w in enumerate(wl):
    for j,s in enumerate(sl):
        if w and s and i*100+j <= lim:
            if i*e >= j and float(j) / float(100*i+j) > maxd:
                maxd = float(j) / float(100*i + j)
                maxw = i*100
                maxs = j
print maxw+maxs,maxs

Buggy submission (verdict: Runtime Error):
a,b,c,d,e,f = map(int,raw_input().split())
lim = f
f /= 100
wl = [False for _ in range(f+1)]
sl = [False for _ in range(f*e+1)]
wl[a] = True
wl[b] = True
sl[c] = True
sl[d] = True

for i in range(f):
    if wl[i] and i+a <= f:
        wl[i+a] = True
    if wl[i] and i+b <= f:
        wl[i+b] = True

for i in range(f*e):
    if sl[i] and i+c <= f*e:
        sl[i+c] = True
    if sl[i] and i+d <= f*e:
        sl[i+d] = True

maxd = 0.0
maxw = 0
maxs = 0
for i,w in enumerate(wl):
    for j,s in enumerate(sl):
        if w and s and i*100+j <= lim:
            if i*e >= j and float(j) / float(100*i+j) > maxd:
                maxd = float(j) / float(100*i + j)
                maxw = i*100
                maxs = j
print maxw+maxs,maxs
Problem p03612 (python)

Fixed submission:
n = int(raw_input())
l = map(int, raw_input().split())
ans = 0
i = 0
while i < n:
    if i+1 == l[i]:
        ans += 1
        if i+1 < n and i+2 == l[i+1]:
            i += 1
    i += 1
print ans

Buggy submission (verdict: Runtime Error):
n = int(raw_input())
l = map(int, raw_input().split())
ans = 0
i = 0
while i < n:
    if i+1 == l[i]:
        ans += 1
        if i+2 == l[i+1]:
            i += 1
    i += 1
print ans
Problem p04033 (python)

Fixed submission:
a,b = map(int, raw_input().split())
if a <= 0 and b >= 0:
    print 'Zero'
elif a < 0 and b < 0 and (b-a) % 2 == 0:
    print 'Negative'
else:
    print 'Positive'

Buggy submission (verdict: Runtime Error):
n,m = map(int, raw_input().split())
rl = [0.0 for _ in range(n)]
wl = [1.0 for _ in range(n)]
rl[0] = 1.0
wl[0] = 0.0
for _ in range(m):
    x,y = map(int, raw_input().split())
    p = rl[x-1] + wl[x-1]
    rl[y-1] += rl[x-1] / p
    wl[y-1] += wl[x-1] / p
    rl[x-1] -= rl[x-1] / p
    wl[x-1] -= wl[x-1] / p
cnt = 0
for p in rl:
    if p != 0:
        cnt += 1
print cnt
Problem p03523 (python)

Fixed submission:
s = 'AKIHABARA'
t = raw_input()
n = len(t)
i = 0
j = 0
while i < n and j < len(s): 
	if t[i] == s[j]:
		i += 1
		j += 1
	elif s[j] == 'A':
		j += 1
	else:
		print 'NO'
		exit()
while j < len(s):
	if s[j] == 'A':
		j += 1
	else:
		break
if i == n and j == len(s):
	print 'YES'
else:
	print 'NO'

Buggy submission (verdict: Runtime Error):
s = 'AKIHABARA'
t = raw_input()
n = len(t)
i = 0
j = 0
while i < n: 
	if t[i] == s[j]:
		i += 1
		j += 1
	elif s[j] == 'A':
		j += 1
	else:
		print 'NO'
		exit()
if i == n:
	print 'YES'
else:
	print 'NO'
Problem p03547 (python)

Fixed submission:
a, b = raw_input().split()
if a == b:
	print '='
if a < b:
	print '<'
if a > b:
	print '>'

Buggy submission (verdict: Runtime Error):
x, y, z = map(int, raw_input().split())
print (x - z) / (y + z)
Problem p03565 (python)

Fixed submission:
a = raw_input()
b = raw_input()
a = list(a)
b = list(b)
n = len(a)
m = len(b)
z = ''
for i in range(n - m + 1):
	flag = True
	for j in range(m):
		if a[i + j] != b[j] and a[i + j] != '?':
			flag = False
	if not flag:
		continue
	c = a[::]
	for j in range(m):
		c[i + j] = b[j]
	for i in range(n):
		if c[i] == '?':
			c[i] = 'a'
	if z == '':
		z = c
	else:
		z = min(z, c)
if z == '':
	print 'UNRESTORABLE'
else:
	print ''.join(z)

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
a = list(a)
b = list(b)
n = len(a)
m = len(b)
z = ''
for i in range(n - m + 1):
	flag = True
	for j in range(m):
		if a[i + j] != b[j] and a[i + j] != '?':
			flag = False
	if not flag:
		continue
	c = a
	for j in range(m):
		c[i + j] = b[j]
	for i in range(n):
		if c[i] == '?':
			c[i] = 'a'
	if z == '':
		z = c
	else:
		z = min(z, c)
if z == '':
	print UNRESTORABLE
else:
	print ''.join(z)
Problem p03260 (python)

Fixed submission:

A,B=map(int,input().split())
if A==2 or B==2:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if (A==2 or B==2:
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
A,B=map(int,input().split())
if (A==2 or B==2:
    print("No")
else:
    print("Yes")
Problem p03284 (python)

Fixed submission:
N,K = map(int,input().split())
if N%K==0:
    print(0)
else:
    print(1)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
if N%K==0:
    print(0)
else:
    print(
Problem p03238 (python)

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

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

Fixed submission:
textdata = list(map(int, input().split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

ctlist = [list(map(int, input().split())) for _ in range(route_num)]

for c, t in ctlist:
    if t > time_lim:
        continue
    else:
        candidate += [c]
        
if len(candidate)==0:
    print("TLE")
else:
    print(min(candidate))

Buggy submission (verdict: Runtime Error):
text = input()
textdata = list(map(int, text.split()))
route_num = textdata[0]
time_lim = textdata[1]
candidate = []

for i in range(route_num):
    if textdata[2*(i+1)+1] > time_lim:
        continue
    else:
        candidate += [textdata[2*(i+1)]]
        
if len(candidate)==0:
    print("TLE")
else:
    print("{}".format(min(candidate)))
Problem p03238 (python)

Fixed submission:
N = int(input())
if N == 1:
	print('Hello World')
elif N == 2:
	A = int(input())	
	B = int(input())
	print(A+B)

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

x_list=[]
y_list=[]
h_list=[]

def all_same(items):
	return all(map(lambda x: x == items[0], items))

for i in range(N):
	x,y,h=map(int, input().split())
	x_list.append(x)
	y_list.append(y)
	h_list.append(h)	
		
for cy in range(N+1):
	for cx in range(N+1):
		H_list = []
		for i in range(N):
			if h_list[i] != 0:
				H = abs(cx - x_list[i])+abs(cy - y_list[i])+h_list[i]
				H_list.append(H) 
			if h_list[i] == 0:
				H = abs(cx - x_list[i])+abs(cy - y_list[i])+h
				if H > 0:
					break
		else:
			if all_same(H_list):
				print(str(cx)+' '+str(cy)+' '+str(H_list[0]))
				break
		break				
	else:
		continue
	break
Problem p03239 (python)

Fixed submission:
import numpy as np
N,T = map(int, input().split())

c_list = []
t_list=[]
for i in range(N):
	c,t=map(int, input().split())
	c_list.append(c)
	t_list.append(t)

c_list = np.array(c_list)
t_list = np.array(t_list)	

if not np.any(t_list[t_list<=T]):
	print('TLE')
else:
	print(min(c_list[t_list<=T]))

Buggy submission (verdict: Runtime Error):
import numpy as np
N,T = map(int, input().split())

c_list = []
t_list=[]
for i in range(N):
	c,t=map(int, input().split())
	c_list.append(c)
	t_list.append(t)

c_list = np.array(c_list)
t_list = np.array(t_list)	

if t_list[t_list<=T]:
	print('TLE')
else:
	print(min(c_list[t_list<=T]))
Problem p03238 (python)

Fixed submission:
#!/usr/bin/env pypy3


def get_line():
    return input()


def get_tokens():
    return get_line().split()


def get_ints():
    return [int(_) for _ in get_tokens()]


def main():

    n, = get_ints()
    if n == 1:
        print('Hello World')
    else:    
        A, = get_ints()
        B, = get_ints()
        print(A+B)
        
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
#!/usr/bin/env pypy3


def get_line():
    return input()


def get_tokens():
    return get_line().split()


def get_ints():
    return [int(_) for _ in get_tokens()]


def main():

    n, = get_ints()
    A, = get_ints()
    B, = get_ints()
    print('Hello World' if n == 1 else A + B)

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

Fixed submission:
# encoding: utf-8
n = int(input())
if n == 1:
    print('Hello World')
else:
    a = int(input())
    b = int(input())
    print(a + b)

Buggy submission (verdict: Runtime Error):
import math


n, m = map(int, input().split())

for i in range(math.floor(m/n), 0, -1):
    if m % i == 0:
        ans = i
		break

print(ans)
Problem p03254 (python)

Fixed submission:
n, x = map(int, input().split())
children = [int(i) for i in input().split()]
children.sort()
count = 0
for child in children:
  if x < child:
    break
  else:
    x -= child
    count += 1
if count == n and x != 0:
  count -= 1
print(count)

Buggy submission (verdict: Runtime Error):
import copy
import itertools

N, X = map(int, input().split())
xlist = [int(i) for i in input().split()]

def pairwise(iterable):
    "s -> (s0,s1), (s1,s2), (s2, s3), ..."
    a, b = itertools.tee(iterable)
    next(b, None)
    return zip(a, b)
  
def calc_energy(path):
  ret = 0
  k = 0
  for pair in pairwise(path):
    ret += (k + 1) ** 2 * abs(pair[0] - pair[1])
    ret += X
    if pair[1] == 0:
      k = 0
    else:
      k += 1
  return ret

def movepath(cur, last):
  if not last:
    yield calc_energy(cur)
  else:
    if cur[-1] == 0:
      for i in last:
        newlast = copy.copy(last)
        for ret in movepath(cur + [i], newlast):
          yield ret
    else:
      newlast = copy.copy(last)
      newlast.remove(cur[-1])
      for i in [0] + newlast:
       	for ret in movepath(cur + [i], newlast):
          yield ret

print(min(calc_energy(path) for path in movepath([0], xlist)))
Problem p03285 (python)

Fixed submission:
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
if ac:
    print('Yes')
else:
    print('No')

Buggy submission (verdict: Runtime Error):
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
if ac:
    print('Yes')
else:
    print('No)

Buggy submission (verdict: Runtime Error):
N = int(input())
cake = 4
donut = 7
ac = False
for i in range(25):
    for j in range(14):
        if N == (cake * i + donut * j):
            ac = True
            exit()
if ac:
    print('Yes')
else:
    print('No)
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if (N%500) > A:
  print('No')
else:
  print('Yes')

Buggy submission (verdict: Runtime Error):
N = input()
A = input()
FLG = 0
for i in range(A):
  if (N-i)%500 == 0:
    print('YES')
    FLG = 1
	break
if FLG == 0:
  print('NO')
Problem p03455 (python)

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

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a*b) % 2:
  ptint('Odd')
else:
  print('Even')

Buggy submission (verdict: Runtime Error):
a, b = map(int, input().split())
if (a*b)%2:
  ptint('Odd')
else:
  print('Even')
Problem p03485 (python)

Fixed submission:
import math
a, b = map(int, input().split())
x = (a + b)/2
print(math.ceil(x))

Buggy submission (verdict: Runtime Error):
import math
a, b = map(int.input().split())
x = (a + b)/2
print(math.ceil(x))

Buggy submission (verdict: Runtime Error):
import math
a = int(input())
b = int(input())
x = (a + b)/2
print(math.ceil(x))
Problem p03493 (python)

Fixed submission:
s = input()
c = 0
for i in s:
  if i == '1':
    c += 1
print(c)

Buggy submission (verdict: Runtime Error):
s = input()
for i in s:
  if i == '1':
    c += i
print(c)
Problem p03636 (python)

Fixed submission:
s = input()
c = len(s) - 2
print(s[0:1] + str(c) + s[-1:])

Buggy submission (verdict: Runtime Error):
s = input()
c = s.count()
print(s[0:1] + str(c) + s[-1:])

Buggy submission (verdict: Runtime Error):
s = input()
c = s.count()
print(s[1:1] + str(c) + s[-1:1])
Problem p03814 (python)

Fixed submission:
s = list(input())
a = 200000
z = 0
for i in range(len(s)):
  if s[i] == 'A' and a > i:
    a = i
  if s[i] == 'Z' and z < i:
    z = i
print(z-a+1)

Buggy submission (verdict: Runtime Error):
s = list(input())
a = 200000
z = 0
for i in range(len(s)):
  if s[i] = 'A' and a > i:
    a = i
  if s[i] = 'Z' and z < i:
    z = i
print(z-a+1)
Problem p03238 (python)

Fixed submission:
N = int(input())
if (N == 1): 
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a+b)

Buggy submission (verdict: Runtime Error):
N,T = map(int, input().split())
minC = 1001
flag = False
for i in range(int(N)):
    c, t = map(int, input().split())
    if int(T) >= t and minC >= int(c):
        minC = c
        frag = True

if(flag == False):
    print("TLE")
else:
    print(minC)

Buggy submission (verdict: Runtime Error):
N,T = map(int, input().split())
minC = 1001
flag = False
for i in range(int(N)):
    c, t = map(int, input().split())
    if int(T) > t and minC > c:
        minC = c

print(minC)