Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().splot())
print(str(a * b) + str(2 * a + 2 * b))


Fixed submission:
a, b = map(int, input().split())
print(str(a * b) + " " + str(2 * a + 2 * b))
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
if a > b:
    print(str(a) + " > " + str(b))
if a < b:
    print(str(a) + " < " + str(b))
if:
    print(str(a) + " == " + str(b))


Fixed submission:
a, b = map(int, input().split())
if a > b:
    print("a > b")
elif a < b:
    print("a < b")
else:
    print("a == b")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
print("{} {} {}".format(a // b, a % b, (a / b))


Fixed submission:
a, b = map(int, input().split())
print("{} {} {:.5f}".format(a // b, a % b, float(a / b)))
Buggy python submission (verdict: Runtime Error):
x=input
a=x*x*x
print(a)


Fixed submission:
print(int(input())**3)

Buggy python submission (verdict: Runtime Error):
x=1 ≤ x ≤ 100
a=x*x*x
print(a)


Fixed submission:
print(int(input())**3)

Buggy python submission (verdict: Runtime Error):
#include<stdio.h>
 
int main(){
  int x;

  scanf("%d", &x);
 
  printf("%d\n",x*x*x);
 
  return 0;
}


Fixed submission:
print(int(input())**3)
Buggy python submission (verdict: Runtime Error):
  (a,b,c,d,e,f)  =  map(int,input().split())
  g = (a * e)  - (b * d)
  ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g)
  ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g)
  print (ans1,ans2)


Fixed submission:
while True:
    try:
        (a,b,c,d,e,f)  =  map(int,input().split())
    except:
        break
    g = (a * e)  - (b * d)
    ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
    ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
    print (ans1,ans2)

Buggy python submission (verdict: Runtime Error):
while True:
  (a,b,c,d,e,f)  =  map(int,input().split())
  g = (a * e)  - (b * d)
  ans= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
  print (ans)


Fixed submission:
while True:
    try:
        (a,b,c,d,e,f)  =  map(int,input().split())
    except:
        break
    g = (a * e)  - (b * d)
    ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
    ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
    print (ans1,ans2)

Buggy python submission (verdict: Runtime Error):
while True:
  (a,b,c,d,e,f)  =  map(int,input().split())
  g = (a * e)  - (b * d)
  ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
  ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
  print (ans1,ans2)


Fixed submission:
while True:
    try:
        (a,b,c,d,e,f)  =  map(int,input().split())
    except:
        break
    g = (a * e)  - (b * d)
    ans1= "{0:.3f}".format((( e * c) + ( -b * f)) / g + 0)
    ans2= "{0:.3f}".format(((-d * c) + (  a * f)) / g + 0)
    print (ans1,ans2)
Buggy python submission (verdict: Runtime Error):
 N = int(input())
print(pow(N,3))


Fixed submission:
N = int(input())
print(pow(N,3))
Buggy python submission (verdict: Time Limit Exceeded):
try:
    (m,n)  =  map(int,input().split())
except:
    exit

r = pow(m,n) %  1000000007
print (r)


Fixed submission:
(m,n)  =  map(int,input().split())

bi = str(format(n,"b"))
bi = bi[::-1]

c = 1
d = 1000000007

for i in bi:
    if ( i == "1"):
        c = ( c * m ) % d
    m = (m * m) %d
print (c)
Buggy python submission (verdict: Runtime Error):
   x = 1;

    while x <= 9 :
        y = 1;
        while y <= 9 :
             z = x * y;
             print(str(x) + " x " + str(y)  + " = " + str(z) )
             y = y + 1
        print()
        x = x + 1


Fixed submission:
def __main():
    x = 1;
    while x <= 9 :
        y = 1;
        while y <= 9 :
             z = x * y;
             print(str(x) + "x" + str(y)  + "=" + str(z) )
             y = y + 1
        x = x + 1
        
        
__main()
Buggy python submission (verdict: Runtime Error):
w, h , x ,y ,r = map(int,input().split())

xLongLeft = x-r
xLongRight = x + r

yLongTop = y + r
yLongBot = y - r

if((xLongLeft >= 0 and yLongBot >= 0) and (xLongRight <= w and yLongTop <= h):
   print('Yes')
else:
   print('No')



Fixed submission:
w, h , x ,y ,r = map(int,input().split())

xLongLeft = x-r
xLongRight = x + r

yLongTop = y + r
yLongBot = y - r

if((xLongLeft >= 0 and yLongBot >= 0) and (xLongRight <= w and yLongTop <= h)):
   print('Yes')
else:
   print('No')

Buggy python submission (verdict: Runtime Error):
w, h , x ,y ,r = map(int,input().split())

xLongLeft = x-r
xLongRight = x + r

yLongTop = y + r
yLongBot = y - r

if((xLongLeft >= 0 and yLongBot >= 0) and (xLongRight <= w and yLongTop <= h)):
   print('Yes')
else:
   print('No')


Fixed submission:
w, h , x ,y ,r = map(int,input().split())

xLongLeft = x-r
xLongRight = x + r

yLongTop = y + r
yLongBot = y - r

if((xLongLeft >= 0 and yLongBot >= 0) and (xLongRight <= w and yLongTop <= h)):
   print('Yes')
else:
   print('No')
Buggy python submission (verdict: Runtime Error):

while True:
    a,b=map(int,input().split() )
    for i in range(a):
        for j in range(b):
            print('#',end='')
        print()
    if(a==0 and b==0):
        break;



Fixed submission:

while True:
    a,b= map(int,input().split())
    if(a==0 and b==0):
        break;
    for i in range(a):
            print('#'*b)
    print()
Buggy python submission (verdict: Runtime Error):
n = int(input())
x = 1
while x <= 30:
    if(x%3==0 or x%10==3):
        print(' ',end=str(x))
    x += 1



Fixed submission:
n = int(input())
y = 1

while y <= n :
    if(y % 3 == 0):
        print(' %d'%y,end='')
    else:
        p = y
        while(p != 0):
            if(p % 10 == 3):
                print(' %d'%y,end='')
                break
            p //= 10
    y+=1
print()

Buggy python submission (verdict: Runtime Error):
n = int(input())
y = 1

while y <= n :
    if(y % 3 == 0):
        print(' %d'%y,end='')
    else:
        p = y
        while(p != 0):
            if(p % 10 == 3):
                print(' %d'%y,end='')
                break
            p //= 10
    y+=1
print()



Fixed submission:
n = int(input())
y = 1

while y <= n :
    if(y % 3 == 0):
        print(' %d'%y,end='')
    else:
        p = y
        while(p != 0):
            if(p % 10 == 3):
                print(' %d'%y,end='')
                break
            p //= 10
    y+=1
print()
Buggy python submission (verdict: Runtime Error):
while True:
    t=int(input())
    n=int(input())
    b=0
    if t == 0:
        break
    for i in range(n):
        s,f=map(int,input().split())
        a=f-s
        b+=a
    if t<=b:
        print("OK")
    else:
        print(t-b)


Fixed submission:
while True:
    t=int(input())
    if t == 0:
        break
    n=int(input())
    b=0
    for i in range(n):
        s,f=map(int,input().split())
        a=f-s
        b+=a
    if t<=b:
        print("OK")
    else:
        print(t-b)
Buggy python submission (verdict: Runtime Error):
n=int(input().split())
for i in range(n):
    a,b,c,d=map(int,input().split())
    q,w,e,r=0,0,0,0
    q,w=a*c,b*d
    e=q+w
    if c<=5 and d<=2:
        r=e*0.8
    print(r)


Fixed submission:
n=int(input())
for i in range(n):
    a,b,c,d=map(int,input().split())
    q,w,e,r,g=0,0,0,0,0
    q,w=a*c,b*d
    e=q+w
    f=[]
    f.append(e)
    if c<5 and d<2:
        g=(a*5+b*2)*0.8
        f.append(g)
    if c<5 and d>=2:
        g=(a*5+b*d)*0.8
        f.append(g)
    if c>=5 and d<2:
        g=(a*c+b*2)*0.8
        f.append(g)
    if c>=5 and d>=2:
        e=e*0.8
        f.append(e)
    print(int(min(f)))
Buggy python submission (verdict: Runtime Error):
m,f,b=map(int,input().split())
ans=0
if m>b:
    ans=0
elif m<b:
    ans=b-m
elif m+f<b:
    ans="NA"
print(ans)


Fixed submission:
m,f,b=map(int,input().split())
ans=0
if m+f<b:
    ans= "NA"
elif m>b:
    ans=0
elif m<b:
    ans=b-m

print(ans)
Buggy python submission (verdict: Runtime Error):
a=int(input())
if a%7==1:
    print("fri")
if a%7==2:
    print("sat")
if a%7==3:
    print("sun")
if a%7==4:
    print("mon")
if a%7==5:
    print("tue")
if a%7==6:
    print("wed")
if a%==7:
    print("thu")


Fixed submission:
a=int(input())
if a%7==1:
    print("fri")
if a%7==2:
    print("sat")
if a%7==3:
    print("sun")
if a%7==4:
    print("mon")
if a%7==5:
    print("tue")
if a%7==6:
    print("wed")
if a%7==0:
    print("thu")

Buggy python submission (verdict: Runtime Error):
a=int(input())
if a%7==1:
    print("fri")
if a%7==2:
    print("sat")
if a%7==3:
    print("sun")
if a%7==4:
    print("mon")
if a%7==5:
    print("tue")
if a%7==6:
    print("wed")
if a%==0:
    print("thu")


Fixed submission:
a=int(input())
if a%7==1:
    print("fri")
if a%7==2:
    print("sat")
if a%7==3:
    print("sun")
if a%7==4:
    print("mon")
if a%7==5:
    print("tue")
if a%7==6:
    print("wed")
if a%7==0:
    print("thu")
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
e=a*b
c=a*2+b*2
print(e,c)

Fixed submission:
a,b=map(int, input().split())
e=a*b
c=a*2+b*2
print(e,c)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
d=str(a//b)
r=str(a%b)
f=str(a/b)
print(d,r,"{0:.5f}".format(f))

Fixed submission:
a,b= map(int, input().split())
d=a//b
r=a%b
f=a/b
print(d,r,"{0:.5f}".format(f))

Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
d=str(a//b)
r=str(a%b)
f=str(a/b)
print('{} {} {:f}'.format(d, r, f))

Fixed submission:
a,b= map(int, input().split())
d=a//b
r=a%b
f=a/b
print(d,r,"{0:.5f}".format(f))
Buggy python submission (verdict: Runtime Error):
r = int(input())
print(r*r*3.141592,(r+r)*3.141592)


Fixed submission:
from math import pi
r = float(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )

Buggy python submission (verdict: Runtime Error):
from math import pi
r = int(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )


Fixed submission:
from math import pi
r = float(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )

Buggy python submission (verdict: Runtime Error):
from math import pi
r = int(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )


Fixed submission:
from math import pi
r = float(input())
a=r*r*pi
b=(r+r)*pi
print("{0:.6f} {1:.6f}".format( a, b) )
Buggy python submission (verdict: Runtime Error):
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
a=sum(ns)
i=min(ns)
u=max(ns)
print(amin,amax,asum)


Fixed submission:
n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns)
amax=max(ns)
print(amin,amax,asum)
Buggy python submission (verdict: Runtime Error):
#include <stdio.h>
using namespace std;

int gcd(unsigned long num1,unsigned long num2) {
	if (num2 == 0) {
		return num1;
	}return gcd(num2, num1 % num2);
}

int lcm(unsigned long n1, unsigned long n2) {
	return n1 * n2 / gcd(n1, n2);
}

int main() {
	unsigned long a, b;
	while (~scanf("%d %d",&a,&b)) {
		printf("%d %d\n", gcd(a, b),lcm(a,b));
	}
}


Fixed submission:
def gcd(n1,n2):
    if n2==0:
        return n1
    return gcd(n2,n1%n2)

def lcm(n1,n2):
    return n1/gcd(n1,n2)*n2

while True:
    try:
        a,b=[int(i) for i in input().split()]
        print("{} {}".format(int(gcd(a,b)),int(lcm(a,b))))
    except:
        break
Buggy python submission (verdict: Runtime Error):
a_list = []
for i in range(10):
    while True:
        a = input()
        a = int(a)
        if 0<a and a<10000:break
    a_list.append(a)

for i in range(3):
    print(max(a_list))
    a_list.remove(max(a_list))


Fixed submission:
a_list = []
for i in range(10):
    while True:
        a = input()
        a = int(a)
        if 0<=a and a<=10000:break
    a_list.append(a)

for i in range(3):
    print(max(a_list))
    a_list.remove(max(a_list))
Buggy python submission (verdict: Runtime Error):
a = input()
b = input()
c = str(int(a)+int(b))
print(len(c))


Fixed submission:
while True:
  try:
    a,b = list(map(int,input().split()))
    print(len(str(a+b)))
  except EOFError:
    break
Buggy python submission (verdict: Runtime Error):
while True:
    H = int(input())
    W = int(input())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print('#'*W)


Fixed submission:
while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print('#'*W)

    print()
Buggy python submission (verdict: Runtime Error):
import math
a=int(input())
print('{0:.6f} {1:.6f}'.format(a*a*math.pi, (a+a)*math.pi))


Fixed submission:
import math
a=float(input())
print('{0:.6f} {1:.6f}'.format(a*a*math.pi, (a+a)*math.pi))
Buggy python submission (verdict: Runtime Error):
for line in sys.stdin.readlines():
    a, b = map(int, line.split())
    print(len(str(a + b)))


Fixed submission:
while True:
    try:
        a, b = map(int, input().split())
        print(len(str(a+b)))
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
n = int(input())
for i in range(0, n):
    a, b, c = map(int, sorted(input().split()))
    print("YES" if c*c == a*a+b*b else "NO")

Fixed submission:
n = int(input())
for i in range(0, n):
    a, b, c = sorted(map(int, input().split()))
    print("YES" if c*c == a*a+b*b else "NO")
Buggy python submission (verdict: Runtime Error):
import math
for i in range(int(input(n))):
    n = math.ceil((n*1.05)/1000)*1000

Fixed submission:
import math as m
yen = 100000
for i in range(int(input())):
    yen = m.ceil((yen*1.05)/1000)*1000
print(yen)
Buggy python submission (verdict: Runtime Error):
a,b = map(float,raw_input().split())
m = a
if a>b:
    m = b
max = 0
for i in range(2,m+1):
    if a % i == 0 and b % i == 0:
        max = i
print max

Fixed submission:
l = map(int,raw_input().split())
l.sort()
a,b = l
max = 0
while True:
    tmp = a%b
    if tmp == 0:
        max = b
        break
    a = b
    b = tmp
print max

Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
m = a
if a>b:
    m = b
max = 0
for i in range(1,m+1):
    if a % i == 0 and b % i == 0:
        max = i
print max

Fixed submission:
l = map(int,raw_input().split())
l.sort()
a,b = l
max = 0
while True:
    tmp = a%b
    if tmp == 0:
        max = b
        break
    a = b
    b = tmp
print max
Buggy python submission (verdict: Runtime Error):
a,b = map(int,raw_input().split())
print a*b.2*(a+b)

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

if a<b<c:
    print "YES"
else:
    print "NO"

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

if a<b<c:
    print "Yes"
else:
    print "No"
Buggy python submission (verdict: Runtime Error):
import math
a = int(raw_input())
print a*2*math.pi,a*a*math.pi

Fixed submission:
import math
a = float(raw_input())
print "{0:.6f} {1:.6f}".format(a*a*math.pi,a*2*math.pi)

Buggy python submission (verdict: Runtime Error):
import math
a = int(raw_input())
print a*2*math.pi,a*a*math.pi

Fixed submission:
import math
a = float(raw_input())
print "{0:.6f} {1:.6f}".format(a*a*math.pi,a*2*math.pi)
Buggy python submission (verdict: Runtime Error):
#include<iostream>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
using namespace std;
const int MAXN=1000001;
bool p[MAXN];
vector<int> a;
int main(){
	memset(p,false,sizeof(p));
	for (int i=2;i<sqrt(MAXN);i++)
		for (int j=i+i;j<MAXN;j+=i)
			p[j]=true;
	for (int i=2;i<MAXN;i++)
		if (!p[i])
			a.push_back(i);
	int n;
	while (cin >> n){
		vector<int>::iterator f=lower_bound(a.begin(),a.end(),n);
		if (*f==n)
			cout << f-a.begin()+1 << endl;
		else
			cout << f-a.begin() << endl;
	}
	return 0;
}

Fixed submission:
import math
def lb(a,x):
    l=0
    r=len(a)-1
    while l<r:
        mid=int((l+r)/2)
        #print "l=",l,' r=',r
        if a[mid]<x:
            l=mid+1
        else:
            r=mid
    return l

#maxn=1000001 // Wrong Answer?
maxn=1000010
a=[False for i in xrange(maxn)]
for i in xrange(2,int(math.sqrt(maxn))):
    for j in xrange(i+i,maxn,i):
        a[j]=True
b=[]
for i in xrange(2,maxn):
    if not a[i]:
        b.append(i)
while True:
    try:
        n=input()
        f=lb(b,n)
        if b[f]==n:
            print(f+1)
        else:
            print(f)
    except EOFError: break
Buggy python submission (verdict: Runtime Error):
for i in range(1, 10):
for j in range(1, 10):
print(i * j)

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):
for i in range(1, 10):
    for j in range(1, 10):
        print(i + "x" + j + "=" + i * j)

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):
for i in xrange(1,10):
    for j in xrange(1,10):
        print str(i)+ "x" + str(j) + "=" + str(i*J)

Fixed submission:
for i in xrange(1,10):
    for j in xrange(1,10):
        print str(i)+ "x" + str(j) +  "="  + str(i*j)
Buggy python submission (verdict: Runtime Error):
import sys
mt_heigts = map(int, sys.stdin.readlines())
mt_heigts.sort(reverse=True)
for height in mt_heights[:3]:
    print height

Fixed submission:
import sys
mt_heights = map(int, sys.stdin.readlines())
mt_heights.sort(reverse=True)
for height in mt_heights[:3]:
    print height
Buggy python submission (verdict: Runtime Error):
line = raw_input()
print ''.join(reversed(list(raw_input())))

Fixed submission:
line = raw_input()
print ''.join(reversed(list(line)))
Buggy python submission (verdict: Time Limit Exceeded):
import sys
n_list = map(int, sys.stdin.readlines())
n_max = max(n_list)

pn_candidates = range(2, n_max+1)
pn_list = []

while pn_candidates != []:
    pn = pn_candidates[0]
    pn_list.append(pn)
    pn_candidates = [x for x in pn_candidates[1:] if x % pn != 0]

for n in n_list:
    print len([pn for pn in pn_list if pn <= n])

Fixed submission:
import sys
n_list = map(int, sys.stdin.readlines())
n_max = max(n_list)

pn_candidates = [0] + [1] * (n_max - 1)

pn = 2
while pn <= n_max:
    if pn_candidates[pn - 1] != 1:
        pn += 1
        continue

    i = 2
    while pn * i <= n_max:
        pn_candidates[pn * i - 1] = 0
        i += 1
    pn += 1 

for n in n_list:
    print sum(pn_candidates[:n])
Buggy python submission (verdict: Runtime Error):
def swap(a, b, x):
    if x <> a and x <> b:
        return x
    elif x == a:
        return b
    elif x == b:
        return a

w = raw_input()
n = raw_input()

result = range(1, w+1)

for i in range(n):
    a, b = map(lambda x: int(x), raw_input().split(',')
    result = [ swap(a, b, x) for x in result ]

for x in result:
    print x

Fixed submission:
def swap(a, b, row):
    row[a-1], row[b-1] = row[b-1], row[a-1]  

w = int(raw_input())
n = int(raw_input())

result = range(1, w+1)

for i in range(n):
    a, b = map(lambda x: int(x), raw_input().split(','))
    swap(a, b, result)

for x in result:
    print x
Buggy python submission (verdict: Runtime Error):
import math

n = int(raw_input())

for i in range(n):
    a = int(raw_input())
    b = int(raw_input())

    if math.log10(a) > 79 or math.log10(b) > 79:
        print 'overflow'
    else:
        c = a + b
        if math.log10(c) > 79:
            print 'overflow'
        print c

Fixed submission:
n = int(raw_input())

for i in range(n):
    a = raw_input()
    b = raw_input()

    if len(a) > 80 or len(b) > 80:
        print 'overflow'
    else:
        a, b = int(a), int(b)
        c = a + b
        if len(str(c)) > 80:
            print 'overflow'
        else:
            print c

Buggy python submission (verdict: Runtime Error):
import math

n = int(raw_input())

for i in range(n):
    a = int(raw_input())
    b = int(raw_input())

    if math.log10(a) > 79 or math.log10(b) > 79:
        print 'overflow'
    else:
        c = a + b
        if math.log10(c) > 79:
            print 'overflow'
        else:
            print c

Fixed submission:
n = int(raw_input())

for i in range(n):
    a = raw_input()
    b = raw_input()

    if len(a) > 80 or len(b) > 80:
        print 'overflow'
    else:
        a, b = int(a), int(b)
        c = a + b
        if len(str(c)) > 80:
            print 'overflow'
        else:
            print c

Buggy python submission (verdict: Runtime Error):
import math
import sys

for cnt, line in enumerate(sys.stdin):

    if cnt == 0:continue

    if cnt % 2 == 1: 
        a = int(line)
        continue
    else:
        b = int(line)

    if math.log10(a) > 79 or math.log10(b) > 79:
        print 'overflow'
    else:
        c = a + b
        if math.log10(c) > 79:
            print 'overflow'
        else:
            print c

Fixed submission:
n = int(raw_input())

for i in range(n):
    a = raw_input()
    b = raw_input()

    if len(a) > 80 or len(b) > 80:
        print 'overflow'
    else:
        a, b = int(a), int(b)
        c = a + b
        if len(str(c)) > 80:
            print 'overflow'
        else:
            print c
Buggy python submission (verdict: Runtime Error):
num_list = map(int, raw_input().split())
print ' '.join(map(str, sorted(numlist))

Fixed submission:
num_list = map(int, raw_input().split())
print ' '.join(map(str, sorted(num_list)))
Buggy python submission (verdict: Runtime Error):
from math import pi
r = int(raw_input())
print '%f %f' % (pi * r ** 2, 2 * pi * r)

Fixed submission:
from math import pi
r = float(raw_input())
print '%f %f' % (pi * r ** 2, 2 * pi * r)
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
import numpy

for s in sys.stdin:
  d = map( int, s.split() )
  a = numpy.matrix( [ [ d[0], d[1] ], [ d[3], d[4] ] ] )
  b = numpy.matrix( [ d[2], d[5] ]).T
  c = numpy.dot(a.I,b)
  print "%.3f %.3f" % ( float(c[0][0]) , float(c[1][0]) )

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

for s in sys.stdin:
  d = map( float, s.split() )
  det = d[0]*d[4]-d[1]*d[3]
  x = ( d[4]*d[2]-d[1]*d[5] ) / det
  y = ( -d[3]*d[2]+d[0]*d[5] ) / det
  if x == 0:
    x = 0
  if y == 0:
    y = 0
  print "%.3f %.3f" % ( x, y )
Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

for s in sys.stdin:
  d = int(s)
  prime_list = range(d)[2:]
  for e in prime_list[2:]:
    lis = [ f for f in prime_list if f < e ]
    if len( [ 1 for g in lis if e % g == 0] ) > 0 :
      prime_list.remove(e)
  print len(prime_list)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

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

prime_list = calc_prime(999999)
for s in sys.stdin:
  d = int(s)
  print len([prime_list[i] for i in range(len(prime_list)) if prime_list[i] <= d ])

Buggy python submission (verdict: Time Limit Exceeded):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

for s in sys.stdin:
  d = int(s)
  prime_list = range(d)[2:]
  for e in prime_list:
    i = 1
    while True:
      i += 1
      f = e*i
      if f > d:
        break
      if f in prime_list:
        prime_list.remove(f)
  print len( prime_list )

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys

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

prime_list = calc_prime(999999)
for s in sys.stdin:
  d = int(s)
  print len([prime_list[i] for i in range(len(prime_list)) if prime_list[i] <= d ])
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# -*- coding: utf-8 -*-

lis = []
while True:
  d = input()
  if d == 0:
    print lis[-1]
    lis.pop()
  else:
    lis.append(d)

Fixed submission:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
lis = []
for s in sys.stdin:
  d = int(s)
  if d == 0:
    print lis[-1]
    lis.pop()
  else:
    lis.append(d)