Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp = map(float, raw_input().split())
        a = (x1-x2)**2+(y1-y2)**2
        b = (x1-x3)**2+(y1-y3)**2
        c = (x2-x3)**2+(y2-y3)**2
        xa = (x3-xp)**2+(y3-yp)**2
        xb = (x2-xp)**2+(y2-yp)**2
        xc = (x1-xp)**2+(y1-yp)**2
        cosa = (a-b+c)/(2*math.sqrt(b)*math.sqrt(c))
        cosb = (b-a+c)/(2*math.sqrt(a)*math.sqrt(c))
        cosc = (c-a+b)/(2*math.sqrt(a)*math.sqrt(b))
        cos1 = (xc-xa+xc)/(2*math.sqrt(xa)*math.sqrt(b))
        cos2 = (xa-c+xb)/(2*math.sqrt(xb)*math.sqrt(c))
        cos3 = (xb-a+xc)/(2*math.sqrt(xc)*math.sqrt(a))
#       cos4 = (a-b+c)/(2*math.sqrt(xa)*math.sqrt(c))
#      cos5 = (a-b+c)/(2*math.sqrt(xb)*math.sqrt(a))
#      cos6 = (a-b+c)/(2*math.sqrt(xc)*math.sqrt(b))
        
        if cos1<cosa or cos2<cosb or cos3<cosc:
            print "YES"
        print "YES"
        else:
            print "NO"
    except:
        break

Fixed submission:
import math

def L(x1,y1,x2,y2):
	return math.sqrt((x1-x2)**2+(y1-y2)**2)
	
def S(a,b,c):
	s=(a+b+c)/2
	return math.sqrt(s*(s-a)*(s-b)*(s-c))
	
while True:
    try:
        x1,y1,x2,y2,x3,y3,xp,yp = map(float, raw_input().split())
        a  = L(x1,y1,x2,y2)
        b  = L(x1,y1,x3,y3)
        c  = L(x2,y2,x3,y3)
        pa = L(x3,y3,xp,yp)
        pb = L(x2,y2,xp,yp)
        pc = L(x1,y1,xp,yp)
        if S(a,pb,pc)+S(b,pc,pa)+S(c,pa,pb)-S(a,b,c) > 0.0000001:
            print "NO"
        else:
            print "YES"
    except:
        break
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>

int main(void) {
	int i,d,S;
	while (scanf("%d",&d)!=EOF){
		S=0;
		for (i=0;i<600;i+=d){
			S+=d*pow(i,2);
		}
		printf("%d\n",S);
	}
	return 0;
}

Fixed submission:
while True:
    try:
        wid = int(raw_input())
        r = 600 // wid
        integral = 0
        for i in range(1,r):
            integral += wid*(wid*i)**2
        print integral
    except:
        break
Buggy python submission (verdict: Runtime Error):
import math
x = 0
y = 0
while True:
    m, r = map(int, raw_input())
    if m == 0 and r == 0:
        break
    theta += r
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    
print int(x)
print int(

Fixed submission:
import math
x = 0.0
y = 0.0
theta = 90.0
while True:
    m, r = map(int, raw_input().split(","))
    if m == 0 and r == 0:
        break
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    theta += -r
    
print int(x)
print int(y)

Buggy python submission (verdict: Runtime Error):
import math
x = 0.0
y = 0.0
while True:
    m, r = map(int, raw_input().split())
    if m == 0 and r == 0:
        break
    theta += r
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    
print int(x)
print int(y)

Fixed submission:
import math
x = 0.0
y = 0.0
theta = 90.0
while True:
    m, r = map(int, raw_input().split(","))
    if m == 0 and r == 0:
        break
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    theta += -r
    
print int(x)
print int(y)

Buggy python submission (verdict: Runtime Error):
import math
x = 0.0
y = 0.0
while True:
    m, r = map(int, raw_input().split(","))
    if m == 0 and r == 0:
        break
    theta += r
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    
print int(x)
print int(y)

Fixed submission:
import math
x = 0.0
y = 0.0
theta = 90.0
while True:
    m, r = map(int, raw_input().split(","))
    if m == 0 and r == 0:
        break
    rad = theta/180*math.pi
    x += m*math.cos(rad)
    y += m*math.sin(rad)
    theta += -r
    
print int(x)
print int(y)
Buggy python submission (verdict: Runtime Error):
alpha = ["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"]

while True:
    try:
        sent = ""
        word = map(str, raw_input().split())
        for i in range(len(word))
            for j in range(len(word[i])
                for al in alpha:
                    if al == word[i]:
                        word[i] = al
            sent += word + " "
        sent = sent(:lent(sent)-1)
        print sent
    except:
        break

Fixed submission:
alpha = ["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"]
sign = [" ", ".", "," ,":"]

while True:
    try:
        word = raw_input()
        for key in range(26):
            for i in range(len(word)):
                if not word[i] in sign:
                    ref = alpha.index(word[i])
                    word = word[:i]+alpha[(ref+1)%26]+word[i+1:]
            if word.count("the ")>=1 or word.count("that")>=1 or word.count("this")>=1:
                print word
    except:
        break
Buggy python submission (verdict: Runtime Error):
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    a = (y2-y1)/(x2-x1)
    c = (y4-y3)/(x3-x1)
    if a == c:
        print "YES"
    else:
        print "NO"

Fixed submission:
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1e-10:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())
for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    a = (y2-y1)/(x2-x1)
    c = (y4-y3)/(x4-x3)
    if a == c:
        print "YES"
    else:
        print "NO"

Fixed submission:
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1e-10:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    a = (y2-y1)/(x2-x1)
    c = (y4-y3)/(x4-x3)
    if a == c:
        print "YES"
    else:
        print "NO"

Fixed submission:
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1e-10:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
import math
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if x2-x1==0.0 and x4-x3==0.0:
        print "YES"
    elif y2-y1==0.0 and y4-y3==0.0:
        print "YES"
    elif fabs((y2-y1)*(x4-x3) - (y4-y3)*(x2-x1))<0.000001:
        print "YES"
    else:
        print "NO"

Fixed submission:
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1e-10:
        print "YES"
    else:
        print "NO"

Buggy python submission (verdict: Runtime Error):
import math
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if x2-x1==0.0 and x4-x3==0.0:
        print "YES"
    elif y2-y1==0.0 and y4-y3==0.0:
        print "YES"
    elif (y2-y1)*(x4-x3)/(y4-y3)/(x2-x1)==1.0:
        print "YES"
    else:
        print "NO"

Fixed submission:
n = int(raw_input())

for i in range(n):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float, raw_input().split())
    if abs((y4-y3)*(x2-x1)-(y2-y1)*(x4-x3)) < 1e-10:
        print "YES"
    else:
        print "NO"
Buggy python submission (verdict: Runtime Error):
----:---F1  *scratch*      All L1     (Fundamental)------------------------------------------------------------------------------------
Loading subst-jis...done
while True:
    n =	int(raw_input())
    if n == 0:
	break
    a=[]
    for i in range(n):
	a[i] = int(raw_input())
    max	= -1e10
    for	i in range(len(a)):
	sum = 0
        for j in range(i+1:len(a)):
	    sum += a[j]
      	    if sum > max:
		max = sum
    print max

Fixed submission:
while True:
    n = int(raw_input())
    if n == 0:
        break
    a=[]
    for i in range(n):
        a.append(int(raw_input()))
    max = -1e10
    for i in range(len(a)):
        sum = 0
        for j in range(i,len(a)):
            sum += a[j]
            if sum > max:
                max = sum
    print max
Buggy python submission (verdict: Runtime Error):
#use 14x14 paper
paper = [[0 for i in range(14)] for i in range(14)]
while True:
    try:
        x, y, s = map(int, raw_input().split(","))
        x += 2;	y += 2
        if s == 1:
            paper[x][y] += 1
            for i in range(-1,2,2):
                paper[x+i][y] += 1
                paper[x][y+1] += 1
        elif s == 2:
            for i in range(-1,2):
                for j in range(-1,2):
                    paper[x+i][y+j] += 1
        else:
            paper[x+2][y] += 1; paper[x-2][y] += 1
            paper[x][y+2] += 1; paper[x][y-2] += 1
            for i in range(-1,2):
                for j in range(-1,2):
                    paper[x+i][y+j] += 1
    except:
        break

#count white and check max element in paper
white = 0
max = 0
for i in range(2,12):
    for j in range(2,12):
        if paper[i][j] == 0:
            white += 1
	elif paper[i][j] > max:
            max = paper[i][j]
print "%d" % (white)
print "%max" % (max)

Fixed submission:
paper = [[0 for i in range(10)] for j in range(10)]

def drop(x,y):
    global paper
    if 0 <= x < 10 and 0<= y < 10:
        paper[y][x] += 1
    return

def ink(x,y,s):
    drop(x,y)
    drop(x+1,y); drop(x,y+1)
    drop(x-1,y); drop(x,y-1)
    if s == 1: return
    drop(x+1,y+1); drop(x+1,y-1)
    drop(x-1,y+1); drop(x-1,y-1)
    if s == 2: return
    drop(x+2,y); drop(x,y+2)
    drop(x-2,y); drop(x,y-2)
    return

while True:
    try:
        x, y, s = map(int, raw_input().split(","))
        ink(x,y,s)
    except:
        break

print sum([i.count(0) for i in paper])
print max([max(i) for i in paper])
Buggy python submission (verdict: Runtime Error):
while True:
    m, d = map(int, raw_inpud().split())
    if m == 0 and d == 0:
        break

Fixed submission:
y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = {0:"Monday", 1:"Tuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}

while True:
    m, d = map(int, raw_input().split())
    if m == 0 and d == 0:
        break
    n = 0
    for i in range(m):
        n += y[i]
    n -= (y[m-1]-d+1)
    print dow[(n+3)%7]

Buggy python submission (verdict: Runtime Error):
y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = [0:"Monday", 1:"Thuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"]

while True:
    m, d = map(int, raw_inpud().split())
    if m == 0 and d == 0:
        break
    n =	0
    for i in range(m):
        n += y[i]
    n -= (n[m]-d+1)
    print dow[(n+3)%7]

Fixed submission:
y = [31,29,31,30,31,30,31,31,30,31,30,31]
dow = {0:"Monday", 1:"Tuesday", 2:"Wednesday", 3:"Thursday", 4:"Friday", 5:"Saturday", 6:"Sunday"}

while True:
    m, d = map(int, raw_input().split())
    if m == 0 and d == 0:
        break
    n = 0
    for i in range(m):
        n += y[i]
    n -= (y[m-1]-d+1)
    print dow[(n+3)%7]
Buggy python submission (verdict: Runtime Error):
def s(a):
	for i in a:
		if i > b:
			b = i
		elif i > c:
			c = i
		else:
			return False
	return True
	
for n in range(int(raw_input())):
	print "YES" if s(map(int,raw_input().split())) else "NO"

Fixed submission:
def d(x):
    b, c = 0, 0
    for a in x:
        if b < a:
             b = a
        elif c < a:
             c = a
        else:
             return False
    return True
 
n = int(raw_input())
for i in range(n):
    all = map(int, raw_input().split())
    print "YES" if d(all) else "NO"

Buggy python submission (verdict: Runtime Error):
def check(x):
    a, b = 0, 0
    for ball in x:
        if a > ball:
             a = ball
        elif b > ball:
             b = ball
        else:
             return False
    return True

n = int(raw_input())
for i in range(n):
    all = map(int, raw_input().split())
    print "YES" if check(all) else print "NO"

Fixed submission:
def d(x):
    b, c = 0, 0
    for a in x:
        if b < a:
             b = a
        elif c < a:
             c = a
        else:
             return False
    return True
 
n = int(raw_input())
for i in range(n):
    all = map(int, raw_input().split())
    print "YES" if d(all) else "NO"

Buggy python submission (verdict: Runtime Error):
def d(a):
    b, c = 0, 0
    for ball in x:
        if b < a:
             b = a
        elif c < a:
             c = a
        else:
             return False
    return True
 
n = int(raw_input())
for i in range(n):
    all = map(int, raw_input().split())
    print "YES" if d(all) else "NO"

Fixed submission:
def d(x):
    b, c = 0, 0
    for a in x:
        if b < a:
             b = a
        elif c < a:
             c = a
        else:
             return False
    return True
 
n = int(raw_input())
for i in range(n):
    all = map(int, raw_input().split())
    print "YES" if d(all) else "NO"
Buggy python submission (verdict: Runtime Error):
while True:
      try:
            hand = sorted(map(int, raw_input().split(",")))
            kind = len(set(hand))
            ma = max([hand.count(i) for i in hand])
            if kind == 4:
                  print "one pair"
            elif kind == 3:
                  if ma == 2:
                        print "two pair"
                  else:
                        print "three card"
            elif kind == 2:
                  if ma==4:
                        print "four card"
                  else:
                  print "full house"
            else:
                  if hand==[1,10,11,12,13] or hand[4] - hand[0] == 4:
                        print "straight"
                  else:
                        print "null"
      except:
            break

Fixed submission:
while True:
      try:
            hand = sorted(map(int, raw_input().split(",")))
            kind = len(set(hand))
            ma = max([hand.count(i) for i in hand])
            if kind == 4:
                  print "one pair"
            elif kind == 3:
                  if ma == 2:
                        print "two pair"
                  else:
                        print "three card"
            elif kind == 2:
                  if ma==4:
                        print "four card"
                  else:
                        print "full house"
            else:
                  if hand==[1,10,11,12,13] or hand[4] - hand[0] == 4:
                        print "straight"
                  else:
                        print "null"
      except:
            break
Buggy python submission (verdict: Runtime Error):
dict = {"I":1, "V":5, "X":10, "L":50, "C":100, "D":500, "M":1000}

while True:
    try:
        roman = raw_input()
        sum = 0
        value = 1000
        for i in range(len(roman)):
            if value >= dict[roman[i]]:
                value = dict[roman[i]]
                sum += value
            elif:
                sum -= 2*value
                value = dict[roman[i]]
                sum += value
        print sum
    except:
        break

Fixed submission:
dict = {"I":1, "V":5, "X":10, "L":50, "C":100, "D":500, "M":1000}

while True:
    try:
        roman = raw_input()
        sum = 0
        value = 1000
        for i in range(len(roman)):
            if value >= dict[roman[i]]:
                value = dict[roman[i]]
                sum += value
            else:
                sum -= 2*value
                value = dict[roman[i]]
                sum += value
        print sum
    except:
        break
Buggy python submission (verdict: Runtime Error):
dict = ["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"]
lsalpha = [1,3,5,7,9,11,15,17,19,21,23,25]

def deaffine(alpha, beta, code):
    decode = ""
    for chara in code:
        if chara != " ":
            f = dict.index(chara)
            for i in range(26):
                if (alpha*i + beta)%26 == f:
                    dechara = dict[i]
                    break
            decode += dechara
        else:
            decode += " "
    return decode
    
n = int(raw_input())
for roop in range(n):
    code = raw_input()
    for alpha in lsalpha:
        flag = 0
        for beta in range(26):
            deaffine(alpha, beta, code)
            if decode.count("that") > 0 or decode.count("this") > 0:
                flag = 1
                break
        if flag == 1:
            break
    print decode

Fixed submission:
dict = ["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"]
lsalpha = [1,3,5,7,9,11,15,17,19,21,23,25]

def decode(alpha, beta, code):
    msg = ""
    for chara in code:
        if chara != " ":
            f = dict.index(chara)
            for i in range(26):
                if (alpha*i + beta)%26 == f:
                    dechara = dict[i]
                    break
            msg += dechara
        else:
            msg += " "
    return msg
    
n = int(raw_input())
for roop in range(n):
    code = raw_input()
    for alpha in lsalpha:
        flag = 0
        for beta in range(26):
            msg = decode(alpha, beta, code)
            if msg.count("that") > 0 or msg.count("this") > 0:
                flag = 1
                break
        if flag == 1:
            break
    print msg
Buggy python submission (verdict: Runtime Error):
r = 50001
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
    if p[i]:
        p[2*i+1::i+1] = [0 for x in range(2*i+1,r,i+1)]

while True:
    n = int(raw_input())
    if n == 0:
        break
    count = 0
    for i in range(n/2):
        if p[i] == 1:
            m = n - (i+1)
            if p[m-1] == 1:
                count += 1
    print count

Fixed submission:
def get():
	p,w = map(int, raw_input().split(","))
	for i in range(W-w,-1,-1):
		if bag[i] > 0 and bag[i]+p > bag[i+w]:
			bag[i+w] = bag[i]+p
	else:
		if p > bag[w]: bag[w] = p
	return

c = 1
while True:
	W = int(raw_input())
	if W == 0: break
	bag = [0]*(W+1)
	N = int(raw_input())
	for i in range(N): get()
	w_all = max(bag)
	money = bag.index(w_all)
	print "Case {}:\n{}\n{}".format(c,w_all,money)
	c += 1

Buggy python submission (verdict: Runtime Error):
def get():
	p,w = map(int, raw_input().split(","))
	for i in range(W-w+1,-1,-1):
		if bag[i] > 0 and bag[i]+p > bag[i+w]:
			bag[i+w] = bag[i]+p
	else:
		if p > bag[w]: bag[w] = p
	return

c = 1
while True:
	W = int(raw_input())
	if W == 0: break
	bag = [0]*(W+1)
	N = int(raw_input())
	for i in range(N): get()
	w_all = max(bag)
	money = bag.index(w_all)
	print "Case {}:\n{}\n{}".format(c,w_all,money)
	c += 1

Fixed submission:
def get():
	p,w = map(int, raw_input().split(","))
	for i in range(W-w,-1,-1):
		if bag[i] > 0 and bag[i]+p > bag[i+w]:
			bag[i+w] = bag[i]+p
	else:
		if p > bag[w]: bag[w] = p
	return

c = 1
while True:
	W = int(raw_input())
	if W == 0: break
	bag = [0]*(W+1)
	N = int(raw_input())
	for i in range(N): get()
	w_all = max(bag)
	money = bag.index(w_all)
	print "Case {}:\n{}\n{}".format(c,w_all,money)
	c += 1
Buggy python submission (verdict: Runtime Error):
import math
&#160;
r = 50000
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
&#160;&#160;&#160;&#160;if p[i]:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for j in range(2*i+1,r,i+1):
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;p[j] = 0
&#160;
while True:
&#160;&#160;&#160;&#160;try:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;n = int(raw_input())
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for i in range(n,50000):
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;    if p[i] == 1:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;        lp = i
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;        break
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;for i in range(n-1,3,-1):
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;    if p[i] == 1:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;        sp = i
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;        break
&#160;&#160;&#160;&#160;&#160;&#160;&#160; print lp, sp
&#160;&#160;&#160;&#160;except:
&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;break

Fixed submission:
import math

n = []
while True:
    try:
        n.append(int(raw_input()))
    except:
        break
    
r = max(n)+100
sqrt = int(math.sqrt(r))
p = [1]*r
p[0] = 0
for i in range(1,sqrt):
    if p[i]:
        for j in range(2*i+1,r,i+1):
            p[j] = 0

for a in n:
    for i in range(a,r):
       if p[i] == 1:
            lp = i+1
            break
    for i in range(a-2,0,-1):
        if p[i] == 1:
            sp = i+1
            break
    print sp, lp
Buggy python submission (verdict: Runtime Error):
i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(",")))
        i += 1; all += n; sum += price
    except
        break
    
print sum
print int(round(float(all)/i))

Fixed submission:
i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(","))
        i += 1; all += n; sum += price*n
    except:
        break
    
print sum
print int(round(float(all)/i))

Buggy python submission (verdict: Runtime Error):
i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(","))
        i += 1; all += n; sum += price
    except
        break
    
print sum
print int(round(float(all)/i))

Fixed submission:
i, all, sum = 0, 0, 0
while True:
    try:
        price, n = map(int, raw_input().split(","))
        i += 1; all += n; sum += price*n
    except:
        break
    
print sum
print int(round(float(all)/i))
Buggy python submission (verdict: Runtime Error):
i = 0
while 1:
    try:
         a[i] = float(raw_input())
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Buggy python submission (verdict: Runtime Error):
i = 0
a=[]
while 1:
    try:
         a.append(float(raw_input()))
         i += 1
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Buggy python submission (verdict: Runtime Error):
a=[]
while 1:
    try:
         a.append(float(raw_input()))
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Buggy python submission (verdict: Runtime Error):
a=[]
while 1:
    try:
         h = float(row_input())
         a.append(h)
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Buggy python submission (verdict: Runtime Error):
a=[]
while True:
    try:
         h = float(row_input())
         a.append(h)
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]

Buggy python submission (verdict: Runtime Error):
a=[]
while True:
    try:
	h = float(row_input())
	a.append(h)
    except:
	break
a.sort()
print a[len(a)-1] - a[0]

Fixed submission:
a=[]
while True:
    try:
        a.append(float(raw_input()))
    except:
        break

a.sort()
print a[len(a)-1] - a[0]
Buggy python submission (verdict: Runtime Error):
ls = {"A":0, "B":1, "C":2}
cup = [1,0,0]
while 1:
    try:
	x, y = map(str,	raw_input().split(","))
	tmp = cup[ls[x]]
	cup[ls[x]] = cup[ls[y]]
	cup[ls[y]] = cup[ls[x]]
    except:
        break
p = cup.index(1)
if c == 0:
    print "A"
else:
    print "B" if c == 1	else "C"

Fixed submission:
ls = {"A":0, "B":1, "C":2}
cup = [1,0,0]
while 1:
    try:
        x, y = map(str, raw_input().split(","))
        tmp = cup[ls[x]]
        cup[ls[x]] = cup[ls[y]]
        cup[ls[y]] = tmp
    except:
        break
p = cup.index(1)
if p == 0:
    print "A"
else:
    print "B" if p == 1 else "C"