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

Fixed submission:
# -*- coding: utf-8 -*-

ans = 0
a = int(raw_input())
b = int(raw_input())
ans = ans + min([a,b])
a = int(raw_input())
b = int(raw_input())
ans = ans + min([a,b])

print ans

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a,b = map(int, raw_input().split())
h_max = 40
w_max = 100
ans = []
for j in range(w_max):
    buff = [ 0 for i in range(h_max/2)] + [ 1 for i in range(h_max/2)]
    ans.append(buff)

h = h_max
w = w_max
a = a - 1
b = b - 1

px = 0
py = 0
while b > 0:
    b = b - 1
    ans[px][py] = 1
    px = px + 2
    if px > w_max - 1:
        py = py + 2
        px = 0
#    print("[{} {}]".format(px, py))

px = 0
py = h_max / 2 + 1
while a > 0:
    a = a - 1
    ans[px][py] = 0
    px = px + 2
    if px > w_max - 1:
        py = py + 2
        px = 0
#    print("[{} {}]".format(px, py))

print("{} {}".format(h, w))
for j in range(h):
    s = ""
    for i in range(w):
        if ans[i][j] == 0:
            s = s + '.'
        else:
            s = s + '#'
    print s

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

a,b = map(int, raw_input().split())
h_max = 100
w_max = 100
ans = []
for j in range(w_max):
    buff = [ 0 for i in range(h_max/2)] + [ 1 for i in range(h_max/2)]
    ans.append(buff)

h = h_max
w = w_max
a = a - 1
b = b - 1

px = 0
py = 0
while b > 0:
    b = b - 1
    ans[px][py] = 1
    px = px + 2
    if px > w_max - 1:
        py = py + 2
        px = 0
#    print("[{} {}]".format(px, py))

px = 0
py = h_max / 2 + 1
while a > 0:
    a = a - 1
    ans[px][py] = 0
    px = px + 2
    if px > w_max - 1:
        py = py + 2
        px = 0
#    print("[{} {}]".format(px, py))

print("{} {}".format(h, w))
for j in range(h):
    s = ""
    for i in range(w):
        if ans[i][j] == 0:
            s = s + '.'
        else:
            s = s + '#'
    print s
Problem p03316 (python)

Fixed submission:
def main():
    N = input()
    Sn = 0
    for n in N: Sn += int(n)
    if int(N) % Sn == 0:
        print('Yes')
    else:
        print('No')
    
if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    N = input()
    Sn = 0
    for n in N: Sn += int(n)
    print(Yes if int(N) % Sn == 0 else 'No')
    
if __name__ == '__main__':
    main()
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):
#include <bits/stdc++.h>
using namespace std;
int main(void){
  int n;
  cin>>n;
  int a,b;
  if (n==1) cout<<"Hello World";
  else{
    cin>>a;
    cin>>b;
    cout<<a+b;
  }
}
Problem p03494 (python)

Fixed submission:
def half(xs):
    count = 0
    while True:
        for i in range(len(xs)):
            if xs[i] % 2 != 0 or xs[i] == 0:
                return count
            xs[i] /= 2
        else:
            count += 1
    return count


def main():
    _num = input()
    xs = [int(i) for i in input().split()]
    res = half(xs)
    print(res)


if __name__ == "__main__":
    main()

Buggy submission (verdict: Runtime Error):
def half(xs):
  for x in xs:
    if x % 2 == 0:
      return xs
  for i in range(len(xs)):
    xs[i] /= 2
  return half(xs)


ls = [int(num) for num in input().split()]
print(half(ls))
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())

a = []

for i in range(n):
    a.append(list(map(int,input().split())))

min = 9999

for i in a:
    if i[1] <= t and i[0] < min:
        min = i[0]

if min > 1000:
    print("TLE")
else:
    print(min)

Buggy submission (verdict: Runtime Error):
n = int(input())
if n ==1:
    print(Hello World)
else:
    a = int(input())
    b = int(input())
    print(a+b)
Problem p03238 (python)

Fixed submission:
a=int(input())
if a==1:
    print("Hello World")
elif a==2 :
    b=int(input())
    c=int(input())
    print(b+c)

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
min=1001
for i in range(N):
    c,t=map(int,input().split())
    if t<(T+1):
        if c<min:
            min=c           
if min==1001:
    print("TLE")
else:
    print(min)

Buggy submission (verdict: Runtime Error):
N,T=map(int,input().split())
min=1001
for i in range(N):
    c,t=map(int,input().split())
    if t<(T+1):
        if c<min:
            min=c           
if min=1001:
    print("TLE")
else:
    print(min)
Problem p03282 (python)

Fixed submission:
s = raw_input()
k = int(raw_input())

ans = '1'
i = 0
while i < k and i < len(s):
	if s[i] != '1':
		ans = s[i]
		break
	i = i + 1

print ans

Buggy submission (verdict: Runtime Error):
s = raw_input()
k = int(raw_input())

ans = '1'

for i in range(0, k):
	if s[i] != '1':
		ans = s[i]
		break

print ans
Problem p03285 (python)

Fixed submission:
cake = []
donut = []
for i in range(1, 26):
	cake.append(i*4)
for i in range(1, 15):
	donut.append(i*7)

n = int(raw_input())

flag = False
if n in cake: flag = True
if n in donut: flag = True
if not flag:
	for i in range(0, len(cake)):
		for j in range(0, len(donut)):
			if n == cake[i] + donut[j]:
				flag = True
				break
		if flag: break

if flag: print 'Yes'
else: print 'No'

Buggy submission (verdict: Runtime Error):
cake = []
donut = []
for i in range(1, 26):
	cake.append(i*4)
for i in range(1, 15):
	donut.append(i*7)

n = int(raw_input())

flag = false
if n in cake: flag = true
if n in donut: flag = true
if not flag:
	for i in range(0, len(cake)):
		for j in range(0, len(donut)):
			if n == cake[i] + donut[j]:
				flag = true
				break
		if flag: break

if flag: print 'Yes'
else: print 'No'
Problem p03316 (python)

Fixed submission:
s = raw_input()
sum = 0
for i in range(0, len(s)):
	sum = sum + int(s[i])
if int(s) % sum == 0: print 'Yes'
else: print 'No'

Buggy submission (verdict: Runtime Error):
s = raw_input()
sum = 0
for i in range(0, len(s)):
	sum = int(s[i])
if int(s) % sum == 0: print 'Yes'
else: print 'No'
Problem p03386 (python)

Fixed submission:
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[0]+inpt[2]):
	if i > inpt[1]: break
	print i
for i in range(inpt[1]-inpt[2]+1, inpt[1]+1):
	if i >= inpt[0]+inpt[2]:
		print i

Buggy submission (verdict: Runtime Error):
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[1]+1):
	if i < inpt[0] + inpt[2] or inpt[1] - inpt[2] < i:
		print i

Buggy submission (verdict: Runtime Error):
inpt = map(int, raw_input().split())

for i in range(inpt[0], inpt[1]+1):
	if i < inpt[0] + inpt[2] or inpt[1] - inpt[2] < i:
		print i
Problem p03416 (python)

Fixed submission:
A, B = map(int, raw_input().split())
cnt = 0
for i in range(A, B+1):
	s = str(i)
	if s[0] == s[4] and s[1] == s[3]:
		cnt = cnt + 1

print cnt

Buggy submission (verdict: Runtime Error):
A, B = map(int, raw_input().split())
cnt = 0
for i in range(A, B+1):
	s = str[i]
	if s[0] == s[4] and s[1] == s[3]:
		cnt = cnt + 1

print cnt
Problem p03455 (python)

Fixed submission:
inpt = map(int, raw_input().split())

if (inpt[0] * inpt[1]) % 2 == 0:
	print "Even"
else:
	print "Odd"

Buggy submission (verdict: Runtime Error):
inpt = map(int, raw_input())

if (inpt[0] * inpt[1]) % 2 == 0: print 'Even'
else: print 'Odd'
Problem p03471 (python)

Fixed submission:
def searchyen(n, y):
	for i in range(0, n+1):
		for j in range(0, n+1-i):
			if 10000*i + 5000*j + 1000*(n-i-j) == y:
				return [i, j, n-i-j]
	return [-1, -1, -1]

inpt = map(int, raw_input().split())

ans = searchyen(inpt[0], inpt[1])
print str(ans[0]) + ' ' + str(ans[1]) + ' ' + str(ans[2])

Buggy submission (verdict: Runtime Error):
def searchyen(n, y):
	for i in range(0, n+1):
		for j in range(0, n+1-i):
			if 10000*i + 5000*j + 1000*(n-i-j) == y:
				return [i, j, k]
	return [-1, -1, -1]

inpt = map(int, raw_input().split())

ans = searchyen(inpt[0], inpt[1])
print str(ans[0]) + ' ' + str(ans[1]) + ' ' + str(ans[2])
Problem p03501 (python)

Fixed submission:
def smaller(x, y):
	if x < y: return x
	else: return y

N, A, B = map(int, raw_input().split())
print smaller(A*N, B)

Buggy submission (verdict: Runtime Error):
def smaller(int x, int y):
	if x < y: return x
	else: return y

inpt = map(int, raw_input())
n = inpt[0]
a = inpt[1]
b = inpt[2]

print smaller(n*a, b)
Problem p03502 (python)

Fixed submission:
def harshad(x):
	sum = 0
	for i in range(0, len(x)):
		sum = sum + int(x[i])
	if int(x)%sum == 0: return 'Yes'
	else: return 'No'

print harshad(raw_input())

Buggy submission (verdict: Runtime Error):
def harshad(x):
	sum = 0
	for i in range(0, len(x)):
		sum = sum + x[i]
	if int(x)%sum == 0: return 'Yes'
	else: return 'No'

print harshad(raw_input())
Problem p03624 (python)

Fixed submission:
S = raw_input()
lst = []
for i in range(0, 26):
	lst.append(True)

for i in range(0, len(S)):
	lst[ord(S[i])-97] = False

flag = True
for i in range(0, 26):
	if lst[i]:
		print chr(i+97)
		flag = False
		break

if flag:
	print 'None'

Buggy submission (verdict: Runtime Error):
S = raw_input()
lst = []
for i in range(0, 26):
	lst.append(True)

for i in range(0, len(S)):
	lst[ord(S[i])-141] = False

flag = True
for i in range(0, 26):
	if lst[i]:
		print chr(i+141)
		flag = False
		break

if flag:
	print 'None'
Problem p03681 (python)

Fixed submission:
def fct(x):
	t = 1L
	for i in range(1, x+1):
		t = (t * long(i)) % 1000000007L
	return t

inpt = map(int, raw_input().split())
n = inpt[0]
m = inpt[1]

ans = 0L

if abs(n-m) < 2:
	ans = (fct(n)*fct(m)) % 1000000007L
	if n == m:
		ans = (2L * ans) % 1000000007L

print ans

Buggy submission (verdict: Runtime Error):
inpt = map(int, raw_input().split())
n = inpt[0]
m = inpt[1]

ans = long(0)

if abs(n-m) < 2:
	ans = fct(n)*fct(m)
	if n == m:
		ans = 2 * ans

print ans % 1000000007L
Problem p03337 (python)

Fixed submission:
# -*- coding:utf-8 -*-
if __name__ == "__main__":
    a, b = map(int, input().split())
    ans = max(a+b, max(a-b, a*b))
    print(ans)

Buggy submission (verdict: Runtime Error):
<?php
fscanf(STDIN, "%d %d", $a, $b);
$ans = max($a+$b, max($a-$b, $a*$b));
print("$ans\n");
?>
Problem p03423 (python)

Fixed submission:
# -*- coding:utf-8 -*-
import math
if __name__ == "__main__":
    n = int(input())
    print(math.floor(n/3))

Buggy submission (verdict: Runtime Error):
<?php
$n = intval(trim(fgets(STDIN)));
$ans = floor($n/3);
print "$ans\n";
?>
Problem p03477 (python)

Fixed submission:
# -*- coding:utf-8 -*-
a, b, c, d = map(int, input().split())
l = a+b
r = c+d
if l > r:
    print("Left")
elif l < r:
    print("Right")
else:
    print("Balanced")

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
a, b, c, d = map(int, input().split)
l = a+b
r = c+d
if l > r:
    print("Left")
elif l < r:
    print("Right")
else:
    print("Balanced")
Problem p03547 (python)

Fixed submission:
# -*- coding:utf-8 -*-
d = { 'A':10, 'B':11, 'C':12, 'D':13, 'E':14, 'F':15 }
x, y = input().split()
if d[x] > d[y]:
    print(">")
elif d[x] < d[y]:
    print("<")
else:
    print("=")

Buggy submission (verdict: Runtime Error):
<?php
fscanf(STDIN, "%s %s", $x, $y);
$factors = [];
for ($tmp = 0; $tmp < 6; $tmp++){
    $factors[chr(ord('A')+$tmp)] = $tmp+10;
}
if ($factors[$x] < $factors[$y]){
    print "<\n";
} else if($factors[$x] > $factors[$y]){
    print ">\n";
} else {
    print "=\n";
}
?>
Problem p03633 (python)

Fixed submission:
# -*- coding:utf-8 -*-
def euc(a,b):
    if b == 0:
        return a
    else:
        return euc(b, a%b)

N = int(input())
T = [ int(input()) for tmp in range(N) ]
if len(T) > 1:
    a = T.pop()
    b = T.pop()
    lcm = a*b//euc(a,b)
    for tmp in T:
        lcm = tmp*lcm//euc(tmp,lcm)
    print(lcm)
else:
    print(T.pop())

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def euc(a,b):
    if b == 0:
        return a
    else:
        return euc(b, a%b)

N = int(input())
T = [ int(input()) for tmp in range(N) ]
if len(T) > 1:
    a = T.pop()
    b = T.pop()
    lcm = a*b/euc(a,b)
    for tmp in T:
        lcm = tmp*lcm/euc(tmp,lcm)
    print(int(lcm))
else:
    print(T.pop())
Problem p03665 (python)

Fixed submission:
# -*- coding:utf-8 -*-
import itertools, math
N, P = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
odd = [ tmp for tmp in a if tmp%2 != 0]
even = [ tmp for tmp in a if tmp%2 == 0]
d = math.factorial(len(odd))
e = math.factorial(len(even))
if P == 0:
    ans += 1
    b = sum([ (d//math.factorial(len(odd)-tmp))//math.factorial(tmp) for tmp in range(2, len(odd)+1, 2) ])
else:
    b = sum([ (d//math.factorial(len(odd)-tmp))//math.factorial(tmp) for tmp in range(1, len(odd)+1, 2) ])
c = [ (e//math.factorial(len(even)-tmp))//math.factorial(tmp) for tmp in range(1, len(even)+1) ]
for tmp in c:
    ans += tmp*b
else:
    if P == 0:
        ans += b+sum(c)
    else:
        ans += b
print(ans)

Buggy submission (verdict: Runtime Error):
N, P = map(int, input().split())
a = list(map(int, input().split()))
ans = 0
odd = [ tmp for tmp in a if tmp%2 != 0]
even = [ tmp for tmp in a if tmp%2 == 0]
if P == 0:
    ans += 1
    b = sum([ len(list(itertools.combinations(odd,tmp))) for tmp in range(2, len(odd)+1, 2) ])
else:
    b = sum([ len(list(itertools.combinations(odd,tmp))) for tmp in range(1, len(odd)+1, 2) ])
c = [ len(list(itertools.combinations(even, tmp))) for tmp in range(1, len(even)+1) ]
factor = 0
for tmp in c:
    ans += tmp*b
    factor += tmp
else:
    if P == 0:
        ans += b+factor
    else:
        ans += b
print(ans)
Problem p03695 (python)

Fixed submission:
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
rate = [ 0 for tmp in range(9) ]
factor = 0
empty = 0
for tmp in range(N):
    if 1 <= a[tmp] and  a[tmp] <= 399:
        rate[0] += 1
    elif 400 <= a[tmp] and a[tmp] <= 799:
        rate[1] += 1
    elif 800 <= a[tmp] and a[tmp] <= 1199:
        rate[2] += 1
    elif 1200 <= a[tmp] and a[tmp] <= 1599:
        rate[3] += 1
    elif 1600 <= a[tmp] and a[tmp] <= 1999:
        rate[4] += 1
    elif 2000 <= a[tmp] and a[tmp]<= 2399:
        rate[5] += 1
    elif 2400 <= a[tmp] and a[tmp] <= 2799:
        rate[6] += 1
    elif 2800 <= a[tmp] and a[tmp] <= 3199:
        rate[7] += 1
    else:
        rate[8] += 1
for tmp in range(len(rate)-1):
    if rate[tmp] > 0:
        factor += 1
    else:
        empty += 1
if rate[8] > 0:
    if factor == 0:
        print("1 "+str(rate[8]))
    else:
        print(str(factor)+' '+str(factor+rate[8]))
else:
    print(str(factor)+' '+str(factor))

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
N = int(input())
a = list(map(int, input().split()))
rate = [ 0 for tmp in range(9) ]
factor = 0
empty = 0
for tmp in range(N):
    if 1 <= a[tmp] and  a[tmp] <= 399:
        rate[0] += 1
    elif 400 <= a[tmp] and a[tmp] <= 799:
        rate[1] += 1
    elif 800 <= a[tmp] and a[tmp] <= 1199:
        rate[2] += 1
    elif 1200 <= a[tmp] and a[tmp] <= 1599:
        rate[3] += 1
    elif 1600 <= a[tmp] and a[tmp] <= 1999:
        rate[4] += 1
    elif 2000 <= a[tmp] and a[tmp]<= 2399:
        rate[5] += 1
    elif 2400 <= a[tmp] and a[tmp] <= 2799:
        rate[6] += 1
    elif 2800 <= a[tmp] and a[tmp] <= 3199:
        rate[7] += 1
    else:
        rate[8] += 1
for tmp in range(len(rate)-1):
    if rate[tmp] > 0:
        factor += 1
    else:
        empty += 1
if rate[8] > 0:
    if factor == 0:
        print("1 "+str(rate[8])
    else:
        print(str(factor)+' '+str(factor+rate[8]))
else:
    print(str(factor)+' '+str(factor))
Problem p03697 (python)

Fixed submission:
# -*- coding:utf-8 -*-
a = sum(list(map(int,input().split())))
if a >= 10:
    print("error")
else:
    print(a)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = []
for tmp in range(N):
    s.append(int(input()))
s.sort()
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            total += tmp
    print(0)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = sorted([ int(input()) for tmp in range(N) ])
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            pass
    print(0)
Problem p03699 (python)

Fixed submission:
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = []
for tmp in range(N):
    s.append(int(input()))
s.sort()
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            total += tmp
    print(0)

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
import sys
N = int(input())
s = sorted([ int(input()) for tmp in range(N) ])
total = sum(s)
if total%10 != 0:
    print(total)
else:
    for tmp in s:
        total -= tmp
        if total%10 != 0:
            print(total)
            sys.exit()
        else:
            pass
    print(0)
[Shellingford:
Problem p03779 (python)

Fixed submission:
# -*- coding:utf-8 -*-
'''
def search(t, x, i):
    global X
    if x == X:
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3
'''
X = int(input())
p, i = (0,0)
while True:
    p += i
    i += 1
    if p >= X:
        break
print(i-1)
'''
ans = search(0, 0, 1)
print(ans)
'''

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
def search(t, x, i):
#    print('t:'+str(t)+' x:'+str(x)+' i:'+str(i))
    global X
#    print(l)
#    print('X:'+str(X))
    if x == X:
        #l.append(t)
        return t
    elif x > X:
        ans1 = search(i, x, i+1)
        ans2 = search(i, x-i, i+1)
        return min(ans1, ans2)
    else:
        ans3 = search(i, x+i, i+1)
        return ans3


X = int(input())
ans = search(0, 0, 1)
print(ans)
Problem p03797 (python)

Fixed submission:
# -*- coding:utf-8 -*-
N, M = map(int, input().split())
if M > 0:
    if N*2 <= M:
        print((N+M//2)//2)
    else:
        print(M//2)
else:
    print(0)

Buggy submission (verdict: Runtime Error):
#include <stdio.h>
int main(void){
    long long int N, M;
    scanf("%lld %lld", &N, &M);
    long long int ans = (N+M/2)/2;
    printf("%lld\n", ans);
    return 0;
}
Problem p03994 (python)

Fixed submission:
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if s[tmp] != 'a' and k >= a: 
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    s[len(s)-1] = chr((ord(s[len(s)-1])+k%26))
print(''.join(s))

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if k >= a:
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    if ord('z') >= ord(s[len(s)-1])+k:
        s[len(s)-1] = chr(ord(s[len(s)-1])+k)
    else:
        s[len(s)-1] = chr((ord(s[len(s)-1])+k)-26)
print(''.join(s))

Buggy submission (verdict: Runtime Error):
# -*- coding:utf-8 -*-
s = list(input())
k = int(input())
for tmp in range(len(s)):
    if k == 0:
        break
    a = 26-(ord(s[tmp]) - ord('a'))
    if k >= a:
        k -= a
        s[tmp] = 'a'
    else:
        pass
if k > 0:
    if ord('z') >= ord(s[len(s)-1])+k:
        s[len(s)-1] = chr(ord(s[len(s)-1])+k)
    else:
        s[len(s)-1] = chr(ord('a')+(26-(ord(s[len(s)-1])+k)-1))
print(''.join(s))
Problem p03239 (python)

Fixed submission:
n,o = map(int, input().split())
ans = 1001
for i in range(n):
  c,t = map(int, input().split())
  if t <= o and c <= ans:
    ans =  c
if ans == 1001 : print("TLE")
else : print(ans)

Buggy submission (verdict: Runtime Error):
N,T = map(int,input().split())
ans = 1001
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans:
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Buggy submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans:
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Buggy submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= ans
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Buggy submission (verdict: Runtime Error):
ans = 1001
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T and c <= T
    ans = c
  if ans = 1001:
    print("TLE")
  else:
    print(ans)

Buggy submission (verdict: Runtime Error):
ans = []
N,T = map(int,input().split())
for i in range(N):
  c,t = map(int,input().split())
  if t <= T:
    ans = min(anc,c)
  if not a:
    print("TLE")
Problem p03238 (python)

Fixed submission:
N = int(input())

if N==1:
 print ("Hello World")
elif N==2:
 N1 = int(input())
 N2 = int(input())
 print (N1+N2)

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

if N==1:
	print ("Hello World")
elif N==2:
 	N1 = input()
	N2 = input()
	print (N1+N2)

Buggy submission (verdict: Runtime Error):
N = input()
N1 = input()
N2 = input()

if N==1:
  print ("Hello World")
elif N==1:
  print (N1+N2)
Problem p03260 (python)

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

judge=0
for C in range(1,4):
  if (A*B*C)%2==1:
    judge=1

if judge==1:
  print ("Yes")
else:
  print ("No")

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

judge=0
for i in range(1,4):
	if (j+k+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")

Buggy submission (verdict: Runtime Error):
judge=0
j,k=A,B
for i in range(1,4):
	if (j+k+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")

Buggy submission (verdict: Runtime Error):
judge=0
for i in range(1,4):
	if (A+B+i)*2==1:
      judge=1
if judge==1:
  print ("Yes")
else:
  print ("No")
Problem p03261 (python)

Fixed submission:
num_word = int(input())
word_list=[]
word_list = [str(input()) for i in range(num_word)] 
 
word_list_temp=[]
for j in range(len(word_list)):
  if j == len(word_list)-1:
    print ("Yes")
    break
  else:
    old_word=word_list[j]
    old_word_sep=list(old_word)
    word_list_temp.append(old_word)
    new_word=word_list[j+1]
    new_word_sep=list(word_list[j+1])
    if old_word_sep[len(old_word)-1]!=new_word_sep[0]:
      print ("No")
      break
    elif new_word in list(word_list_temp):
      print ("No")
      break
    else:
      continue

Buggy submission (verdict: Runtime Error):
num_word = int(input())
word_list=[]
word_list = [[int(i) for i in input().split()] for i in range(n)] 

word_list_temp=[]
for j in range(len(word_list)):
  if j == len(word_list)-1:
    print ("Yes")
    break
  else:
    old_word=word_list[j]
    old_word_sep=list(old_word)
    word_list_temp.append(old_word)
    new_word=word_list[j+1]
    new_word_sep=list(word_list[j+1])
    if old_word_sep[len(old_word)-1]!=new_word_sep[0]:
      print ("No")
      break
    elif new_word in list(word_list_temp):
      print ("No")
      break
    else:
      continue
Problem p03264 (python)

Fixed submission:
k = int(input())
print(( k // 2 ) * ( k - k // 2 ))

Buggy submission (verdict: Runtime Error):
k = (int(input())
print(( k // 2 ) * ( k - k // 2 ))