Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
while(1):
    N=int(raw_input())
    if N==0:
        break
    else:
        gems=[]
        okflag=0
        loc=[10,10]
        for i in range(N):
            [gemx,gemy]=[int(x) for x in raw_input().split()]
            gems.append([gemx,gemy])
        M=int(raw_input())
        for i in range(M):
            com=raw_input().split()
            com[1]=int(com[1])
            if com[0]=="N":
                for j in range(com[1]):
                    loc[1]=loc[1]+1
                    if loc in gems:
                        gems.remove(loc)
                #loc[1]=loc[1]+com[1]
            elif com[0]=="S":
                for j in range(com[1]):
                    loc[1]=loc[1]-1
                    if loc in gems:
                        gems.remove(loc)
                #loc[1]=loc[1]-com[1]
            elif com[0]=="E":
                for j in range(com[1]):
                    loc[0]=loc[0]+1
                    if loc in gems:
                        gems.remove(loc)

                #loc[0]=loc[0]+com[1]
            else:
                for j in range(com[1]):
                    loc[0]=loc[0]-1
                    if loc in gems:
                        gems.remove(loc)
                #loc[0]=loc[0]-com[1]
            if len(gems)==0:
                okflag=1
                break
        if okflag:
            print "Yes"
        else:
            print "No"

Fixed submission:
while(1):
    N=int(raw_input())
    if N==0:
        break
    else:
        gems=[]
        okflag=0
        loc=[10,10]
        for i in range(N):
            [gemx,gemy]=[int(x) for x in raw_input().split()]
            gems.append([gemx,gemy])
        M=int(raw_input())
        for i in range(M):
            com=raw_input().split()
            com[1]=int(com[1])
            if com[0]=="N":
                for j in range(com[1]):
                    loc[1]=loc[1]+1
                    if loc in gems:
                        gems.remove(loc)
                #loc[1]=loc[1]+com[1]
            elif com[0]=="S":
                for j in range(com[1]):
                    loc[1]=loc[1]-1
                    if loc in gems:
                        gems.remove(loc)
                #loc[1]=loc[1]-com[1]
            elif com[0]=="E":
                for j in range(com[1]):
                    loc[0]=loc[0]+1
                    if loc in gems:
                        gems.remove(loc)
                #loc[0]=loc[0]+com[1]
            else:
                for j in range(com[1]):
                    loc[0]=loc[0]-1
                    if loc in gems:
                        gems.remove(loc)
                #loc[0]=loc[0]-com[1]
            if len(gems)==0:
                okflag=1
        if okflag:
            print "Yes"
        else:
            print "No"
Buggy python submission (verdict: Runtime Error):
while(1):
    [N,M]=[int(x) for x in raw_input().split()]
    if N==0:
        break
    else:
        H=[]
        W=[]
        for i in range(N):
            H.append(int(raw_input()))
        for i in range(M):
            W.append(int(raw_input()))
        S=0
        for top in range(N):
            for left in range(M):
                h=0
                w=0
                right=left
                for bottom in range(top,N):
                    h=h+H[bottom]
                    while w<h and right<M:
                        w=w+W[right]
                        right=right+1
                    if w==h:
                        S=S+1
        print S

Fixed submission:
import bisect
while(1):
    [N,M]=[int(x) for x in raw_input().split()]
    if N==0:
        break
    else:
        hlist=[]
        wlist=[]
        bef=[]
        for i in range(N):
            newh=int(raw_input())
            news=[newh+a for a in bef]
            hlist+=news
            hlist.append(newh)
            bef=news+[newh]
        bef=[]
        for i in range(M):
            neww=int(raw_input())
            news=[neww+a for a in bef]
            wlist+=news
            wlist.append(neww)
            bef=news+[neww]
        hlist.sort()
        #print hlist,wlist
        ans=0
        for w in wlist:
            ans+=bisect.bisect(hlist,w)-bisect.bisect_left(hlist,w)
        print ans
Buggy python submission (verdict: Runtime Error):
for i

Fixed submission:
for i in range(1,10):
    for j in range(1,10):
        print u"%dx%d=%d" % (i,j,i*j)
Buggy python submission (verdict: Runtime Error):
import string, sys

rot1 = string.maketrans("abcdefghijklmnopqrstuvwxyz. ",\
                        "bcdefghijklmnopqrstuvwxyza. ")

for line in sys.stdin
    while 1:
        if line.count("the") or line.count("this") or line.count("that"):
            print line
            break
        line = text.translate(rot1)

Fixed submission:
import sys,string
A = 'abcdefghijklmnopqrstuvwxyza'
rot = string.maketrans(A[1:], A[:-1])
for line in sys.stdin:
    line = line[:-1]
    while 1:
        if line.count("the") or line.count("this") or line.count("that"):
            print line
            break
        line = line.translate(rot)

Buggy python submission (verdict: Runtime Error):
import sys,string

rot1 = string.maketrans("abcdefghijklmnopqrstuvwxyz. ",\
                        "bcdefghijklmnopqrstuvwxyza. ")

for line in sys.stdin:
    while 1:
        if line.count("the") or line.count("this") or line.count("that"):
            print line
            break
        line = text.translate(rot1)

Fixed submission:
import sys,string
A = 'abcdefghijklmnopqrstuvwxyza'
rot = string.maketrans(A[1:], A[:-1])
for line in sys.stdin:
    line = line[:-1]
    while 1:
        if line.count("the") or line.count("this") or line.count("that"):
            print line
            break
        line = line.translate(rot)
Buggy python submission (verdict: Runtime Error):
p = [1] * 1000001
for i in range(3, 1001, 2):
    if p[i] == 0:
        continue
    for j in range(2, 1000001/i):
        p[i*j] = 0

t = int(raw_input())
for i in range(t):
    n = int(raw_input())
    res = n * (n-1) / 2 + 2
    for j in range(2, n+1):
        if p[j] == 1:
            res -= (n / j - 1) * (j - 1)
    print res

Fixed submission:
count = range(1000001) 
for i in xrange(2, 500001):
    for n in xrange(i*2, 1000001, i):
        count[n] -= (count[i] - 1) 
 
count[1] = 2
for i in xrange(2, 1000001):
    count[i] += count[i-1]

t = int(raw_input())
for i in xrange(t):
    n = int(raw_input())
    print count[n] - n + 1

Buggy python submission (verdict: Runtime Error):
p = [1] * 1000001
for i in range(2, 1001):
    if p[i] == 0:
        continue
    for j in range(2, 1000001/i):
        p[i*j] = 0

t = int(raw_input())
for i in range(t):
    n = int(raw_input())
    res = n * (n-1) / 2 + 2
    for j in range(2, n+1):
        if p[j] == 1:
            res -= (n / j - 1) * (j - 1)
    print res

Fixed submission:
count = range(1000001) 
for i in xrange(2, 500001):
    for n in xrange(i*2, 1000001, i):
        count[n] -= (count[i] - 1) 
 
count[1] = 2
for i in xrange(2, 1000001):
    count[i] += count[i-1]

t = int(raw_input())
for i in xrange(t):
    n = int(raw_input())
    print count[n] - n + 1

Buggy python submission (verdict: Runtime Error):
p = [1] * 1000001
for i in range(2, 1001):
    if p[i] == 0:
        continue
    for j in range(2, 1000000/i+1):
        p[i*j] = 0

t = int(raw_input())
for i in range(t):
    n = int(raw_input())
    res = n * (n-1) / 2 + 2
    for j in range(2, n+1):
        if p[j] == 1:
            res -= (n / j - 1) * (j - 1)
    print res

Fixed submission:
count = range(1000001) 
for i in xrange(2, 500001):
    for n in xrange(i*2, 1000001, i):
        count[n] -= (count[i] - 1) 
 
count[1] = 2
for i in xrange(2, 1000001):
    count[i] += count[i-1]

t = int(raw_input())
for i in xrange(t):
    n = int(raw_input())
    print count[n] - n + 1
Buggy python submission (verdict: Time Limit Exceeded):
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	count = 0
	for i in range(1, int(a**0.5)+1):
		if (a % i) == 0:
			count += 1
	if count == 1:
		s += 1
print s

		

Fixed submission:
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	if a == 1:
		pass
	elif a == 2:
		s += 1
	elif (a%2 == 1):
		for i in xrange(3, (int(a**0.5)+1), 2):
			if a%i==0:
				break	
		else:
			s += 1		
print s

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	if sum(map(lambda x: a%x==0, range(1, int(a**0.5)+1))) == 1:
		s += 1
print s

		

Fixed submission:
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	if a == 1:
		pass
	elif a == 2:
		s += 1
	elif (a%2 == 1):
		for i in xrange(3, (int(a**0.5)+1), 2):
			if a%i==0:
				break	
		else:
			s += 1		
print s

Buggy python submission (verdict: Time Limit Exceeded):
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	count = 0
	for i in range(1, int(a**0.5)+1):
		count += (a%i==0)
	if count == 1:
		s += 1
	#if sum(map(lambda x: a%x==0, range(1, int(a**0.5)+1))) == 1:
	#	s += 1
print s

		

Fixed submission:
n = input()
s = 0
while n > 0:
	n -= 1
	a = input()
	if a == 1:
		pass
	elif a == 2:
		s += 1
	elif (a%2 == 1):
		for i in xrange(3, (int(a**0.5)+1), 2):
			if a%i==0:
				break	
		else:
			s += 1		
print s
Buggy python submission (verdict: Runtime Error):
a, b = input.split()
print str(a*b), str((a+b)*2)

Fixed submission:
a, b = map(int, raw_input().split())
print str(a*b), str((a+b)*2)
Buggy python submission (verdict: Runtime Error):
dic = [['a', 0], ['b', 0], ['c', 0], ['d', 0], ['e', 0], ['f', 0], ['g', 0], ['h', 0], ['i', 0], ['j', 0], ['k', 0], ['l', 0], ['m', 0], ['n', 0], ['o', 0], ['p', 0], ['q', 0], ['r', 0], ['s', 0], ['t', 0], ['u', 0], ['v', 0], ['w', 0], ['x', 0], ['y', 0], ['z', 0]]  
while True:
	s = raw_input()
	if s == '':
		break
	for i in s:
		for j in range(0, 26):
			if dic[j][0] == i.lower():
				dic[j][1] += 1
				break
for i in range(0, 26):
	print dic[i][0], ':', dic[i][1]

Fixed submission:
import sys
dic = [['a', 0], ['b', 0], ['c', 0], ['d', 0], ['e', 0], ['f', 0], ['g', 0], ['h', 0], ['i', 0], ['j', 0], ['k', 0], ['l', 0], ['m', 0], ['n', 0], ['o', 0], ['p', 0], ['q', 0], ['r', 0], ['s', 0], ['t', 0], ['u', 0], ['v', 0], ['w', 0], ['x', 0], ['y', 0], ['z', 0]]  
for s in sys.stdin.read().lower():
	if s == '':
		break
	for i in s:
		for j in range(0, 26):
			if dic[j][0] == i.lower():
				dic[j][1] += 1
				break
for i in range(0, 26):
	print dic[i][0], ':', dic[i][1]
Buggy python submission (verdict: Runtime Error):
print str(i) + 'x' + str(j) + '=' + str(i * j) for j in range(1,10) for i in range(1,10)

Fixed submission:
for i in range(1,10):
	for j in range(1,10):
		print str(i) + 'x' + str(j) + '=' + str(i * j)
Buggy python submission (verdict: Runtime Error):
while True:
	a, b, c, d, e, f = map(float, raw_input().split())
	 
	x = (c * e - b * f) / (a * e - d * b)
	y = (c * d - f * a) / (b * d - e * a)
	 
	print ("{0:.3f} {1:.3f}".format(x + 0, y + 0))

Fixed submission:
z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))

Buggy python submission (verdict: Time Limit Exceeded):
z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		print(z)

Fixed submission:
z = []
while True:
	try:
		a, b, c, d, e, f = map(float, raw_input().split())
		x = (c * e - b * f) / (a * e - d * b)
		y = (c * d - f * a) / (b * d - e * a)
		z.append([x, y])
	
	except:
		break
for i in z:
	print("{:.3f} {:.3f}".format(i[0] + 0, i[1] + 0))
Buggy python submission (verdict: Runtime Error):
x**3

Fixed submission:
x = input()
print(x ** 3)

Buggy python submission (verdict: Runtime Error):
x ** 3

Fixed submission:
x = input()
print(x ** 3)

Buggy python submission (verdict: Runtime Error):
x　＝ input
print (x ** 3)

Fixed submission:
x = input()
print(x ** 3)
Buggy python submission (verdict: Runtime Error):
a=input()
b=input()
print((a*b) 2*(a+b))

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

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

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

Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())
print((a*b,(a+b)*2)

Fixed submission:
a,b = map(int, raw_input().split())
print a*b,(a+b)*2
Buggy python submission (verdict: Runtime Error):
while True:
	n, x = map(int, raw_input().split())
	if n == x == 0:
		break
	else:
		m = 0
		for i in xrange(1, n-1):
			for j in xrange(i+1, n):
				if i + j + j + 1 <= x and x <= i + j + n:
					m += 1
		print m

Fixed submission:
print raw_input().swapcase()
Buggy python submission (verdict: Runtime Error):
i = 0
w = raw_input()
while True:
	t = raw_input()
	if t == 'END_OF_FILE':
		break
	else: 
		i += t.strip('.').split().count(w)
print i

Fixed submission:
i = 0
w = raw_input().upper()
while True:
	t = raw_input()
	if t == 'END_OF_TEXT':
		break
	else: 
		i += t.upper().strip('.').split().count(w)
print i
Buggy python submission (verdict: Runtime Error):
n = input()
print " ".join(sorted(raw_input().split())x)

Fixed submission:
n = input()
x = sorted(map(int, raw_input().split()))
for i in x:
	print i,
Buggy python submission (verdict: Runtime Error):
for i in range(10):
    for s in range(10):
        print i+"*"+s+"="+i*s

Fixed submission:
print "\n".join(["%dx%d=%d"%((i/10+1),(i%10),(i/10+1)*(i%10)) for i in xrange(90)if i%10!=0])
Buggy python submission (verdict: Runtime Error):
n = input()
ans = 100000
for i in range(n):
    ans *= 1.05
    if(ans % 1000) != 0:

Fixed submission:
n = input()
ans = 100000
for i in range(n):
	ans *= 1.05
	if (ans % 1000) != 0:
		ans = int(ans)
		ans /= 1000
		ans *= 1000

		ans += 1000


print int(ans)
Buggy python submission (verdict: Runtime Error):
while True:
    a,b=map(int,raw_input().split())
    c = str(a+b)
    print len(c)

Fixed submission:
while True:
    try:
        a,b=map(int,raw_input().split())
        c = str(a+b)
        print len(c)
    except:
        break
Buggy python submission (verdict: Time Limit Exceeded):
while True:
    try:
        ary = map(int,raw_input().split())
        c = max(ary)
        ary.remove(c)
        a,b = ary

        if a**2 + b**2 == c**2:
            print "YES"
        else:
            print "NO"
    except:
        continue

Fixed submission:
for i in range(input()):

    ary = map(int,raw_input().split())
    c = max(ary)
    ary.remove(c)
    a,b = ary

    if a**2 + b**2 == c**2:
        print "YES"
    else:
        print "NO"
Buggy python submission (verdict: Runtime Error):
a = int(raw_input("input a:"))
b = int(raw_input("input b:"))
print a*b,2*a+2*b

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

Buggy python submission (verdict: Runtime Error):
a = int(raw_input(""))
b = int(raw_input(""))
print a*b,2*a+2*b

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

Buggy python submission (verdict: Runtime Error):
a = int(raw_input(""))
b = int(raw_input(""))
print a*b, 2*a+2*b

Fixed submission:
a,b = map(int,raw_input().split())
print a*b,a*2 + b*2
Buggy python submission (verdict: Runtime Error):
a = []
for i in range(input()):
    a.append(input())
print sorted(a,reverse = True)

Fixed submission:
n = input()
li = map(int,raw_input().split())
while n >= 1:
    print li[n-1],
    n -= 1
Buggy python submission (verdict: Runtime Error):
def sieve(n):
    primes = [True] * n
    primes[0] = primes[1] = False
    for i in xrange(2, int(n ** 0.5) + 1):
        if primes[i]:
            for j in xrange(i * i, n, i):
                primes[j] = False
    return [i for i in xrange(n) if primes[i]]

prime_list = sieve(200000)
while 1:
    a = input()
    if a == 0:
        break
    prin
    t sum(prime_list[:a])

Fixed submission:
def sieve(n):
    primes = [True] * n
    primes[0] = primes[1] = False
    for i in xrange(2, int(n ** 0.5) + 1):
        if primes[i]:
            for j in xrange(i * i, n, i):
                primes[j] = False
    return [i for i in xrange(n) if primes[i]]

prime_list = sieve(200000)
while 1:
    a = input()
    if a == 0:
        break
    print sum(prime_list[:a])
Buggy python submission (verdict: Runtime Error):
while 1:
    numbers = map(int, raw_input())
    dp = [[0] * 10 for _ in xrange(10)]
    dp[0] = numbers
    for i in xrange(9):
        for j in xrange(len(dp[i]) - 1):
            dp[i + 1][j] = (dp[i][j] + dp[i][j + 1]) % 10
    print dp[-1][0]

Fixed submission:
while 1:
    try:
        numbers = map(int, raw_input())
    except EOFError:
        break
    dp = [[0] * 10 for _ in xrange(10)]
    dp[0] = numbers
    for i in xrange(9):
        for j in xrange(len(dp[i]) - 1):
            dp[i + 1][j] = (dp[i][j] + dp[i][j + 1]) % 10
    print dp[-1][0]

Buggy python submission (verdict: Runtime Error):
while 1:
    numbers = map(int, raw_input())
    dp = [[0] * 10 for _ in xrange(10)]
    dp[0] = numbers
    for i in xrange(9):
        for j in xrange(len(dp[i]) - 1):
            dp[i + 1][j] = (dp[i][j] + dp[i][j + 1]) % 10
    print dp[-1][0]

Fixed submission:
while 1:
    try:
        numbers = map(int, raw_input())
    except EOFError:
        break
    dp = [[0] * 10 for _ in xrange(10)]
    dp[0] = numbers
    for i in xrange(9):
        for j in xrange(len(dp[i]) - 1):
            dp[i + 1][j] = (dp[i][j] + dp[i][j + 1]) % 10
    print dp[-1][0]
Buggy python submission (verdict: Runtime Error):
from collections import Counter

cnt = 0
trade = Counter()
while 1:
    line = raw_input()
    if not line:
        break
    cnt += 1
    a, b = map(int, line.split(','))
    trade[a] += 1

for i in xrange(cnt):
    a, b = map(int, raw_input().split(','))
    trade[a] += 1

for k, v in sorted(trade.items()):
    print k, v

Fixed submission:
from collections import Counter

trade1 = Counter()
trade2 = Counter()
while 1:
    line = raw_input()
    if not line:
        break
    a, b = map(int, line.split(','))
    trade1[a] += 1

while 1:
    try:
        a, b = map(int, raw_input().split(','))
    except EOFError:
        break
    trade2[a] += 1

trade = trade1 + trade2
for k in sorted(trade1 & trade2):
    print k, trade[k]
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict


def dfs(v):
    stack.append(v)
    global ret
    if ret:
        return
    if v == 2 and len(used) == cnt:
        ret = True
        return
    for idx, u in enumerate(edges[v]):
        tmp = tuple(sorted((u, v)) + [idx])
        if tmp in used:
            continue
        used.add(tmp)
        dfs(u)
        used.discard(tmp)
    stack.pop()

while 1:
    edges = defaultdict(list)
    cnt = 0
    try:
        a, b = map(int, raw_input().split())
        edges[a].append(b)
        edges[b].append(a)
        cnt += 1
    except EOFError:
        break
    while 1:
        a, b = map(int, raw_input().split())
        if a == b == 0:
            break
        edges[a].append(b)
        edges[b].append(a)
        cnt += 1
    stack = []
    ret = False
    used = set()
    dfs(1)
    if ret:
        print "OK"
    else:
        print "NG"

Fixed submission:
while 1:
    edges = [0] * 101
    try:
        a, b = map(int, raw_input().split())
        edges[a] += 1
        edges[b] += 1
    except EOFError:
        break
    while 1:
        a, b = map(int, raw_input().split())
        if a == b == 0:
            break
        edges[a] += 1
        edges[b] += 1
    if edges[1] % 2 and edges[2] % 2 and all(map(lambda a: a % 2 == 0, edges[3:])):
        print "OK"
    else:
        print "NG"

Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict


def dfs(v):
    global ret
    if ret:
        return
    if v == 2:
        if len(used) == cnt:
            ret = True
        return
    for idx, u in enumerate(edges[v]):
        tmp = tuple(sorted((u, v)) + [idx])
        if tmp in used:
            continue
        used.add(tmp)
        dfs(u)
        used.discard(tmp)

while 1:
    edges = defaultdict(list)
    cnt = 0
    try:
        a, b = map(int, raw_input().split())
        edges[a].append(b)
        edges[b].append(a)
        cnt += 1
    except EOFError:
        break
    while 1:
        a, b = map(int, raw_input().split())
        if a == b == 0:
            break
        edges[a].append(b)
        edges[b].append(a)
        cnt += 1
    stack = []
    ret = False
    used = set()
    dfs(1)
    if ret:
        print "OK"
    else:
        print "NG"

Fixed submission:
while 1:
    edges = [0] * 101
    try:
        a, b = map(int, raw_input().split())
        edges[a] += 1
        edges[b] += 1
    except EOFError:
        break
    while 1:
        a, b = map(int, raw_input().split())
        if a == b == 0:
            break
        edges[a] += 1
        edges[b] += 1
    if edges[1] % 2 and edges[2] % 2 and all(map(lambda a: a % 2 == 0, edges[3:])):
        print "OK"
    else:
        print "NG"
Buggy python submission (verdict: Runtime Error):
L = []
for i in range(input()):
    L.append(map(int, raw_input().split()))
print "%d %d" % sorted(L, key=lambda a:(-a[1], a[0]))[0]

Fixed submission:
L = []
for i in range(input()):
    L.append(map(int, raw_input().split()))
print ' '.join(map(str, sorted(L, key=lambda a:(-a[1], a[0]))[0]))
Buggy python submission (verdict: Time Limit Exceeded):
c = [0] * 200
while 1:
    try:
        for x in raw_input().lower():
            c[ord(x)] += 1
    except:
        for i in range(ord('a'), ord('z') + 1):
            print "%s : %d" % (chr(i), c[i])

Fixed submission:
c = [0] * 200
while 1:
    try:
        for x in raw_input().lower():
            c[ord(x)] += 1
    except EOFError:
        for i in range(ord('a'), ord('z') + 1):
            print "%s : %d" % (chr(i), c[i])
        break
Buggy python submission (verdict: Runtime Error):
W = raw_input().lower()
ret = 0
while 1:
    text = raw_input().lower()
    if text == "END_OF_TEXT":
        break
    ret += text.count(W)
print ret

Fixed submission:
W = raw_input().lower()
ret = 0
while 1:
    text = raw_input().split()
    if text[0] == "END_OF_TEXT":
        break
    for t in text:
        if W == t.lower():
            ret += 1
print ret
Buggy python submission (verdict: Runtime Error):
a = sum(map(int, input().split()))
b = sum(map(int, input().split()))
print (max(a,b))                                       

Fixed submission:
a = sum(map(int, raw_input().split()))
b = sum(map(int, raw_input().split()))
print (max(a,b))
Buggy python submission (verdict: Time Limit Exceeded):
def sieve(n):
    a = range(n)
    a[0], a[1] = None, None
    for i in range(2, n):
        if i ** 2 >= n:
            break
        if a[i] is None:
            continue
        for j in range(i ** 2, n, i):
            a[j] = None
    j = 0
    for i in range(n):
        if a[i] is not None:
            a[j] = a[i]
            j += 1
    return a[0:j]

try:
    while True:
        print len(sieve(int(raw_input()) + 1))
except:
    pass

Fixed submission:
import bisect


def sieve(n):
    a = range(n)
    a[0], a[1] = None, None
    for i in range(2, n):
        if i ** 2 >= n:
            break
        if a[i] is None:
            continue
        for j in range(i ** 2, n, i):
            a[j] = None
    j = 0
    for i in range(n):
        if a[i] is not None:
            a[j] = a[i]
            j += 1
    return a[0:j]

a = sieve(1000000)

try:
    while True:
        print bisect.bisect_right(a, int(raw_input()))
except:
    pass