Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
def mink(x,y,p):
    return (sum([math.fabs(_x - _y)**p for _x, _y in zip(x,y)]))**(1/p)
n = int(input())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
print(mink(x,y,1))
print(mink(x,y,2))
print(mink(x,y,3))
print(mink(x,y,10**9))



Fixed submission:
import math
def mink(x,y,p):
    return (sum([math.fabs(_x - _y)**p for _x, _y in zip(x,y)]))**(1/p)
def mink_i(x,y):
    return max([math.fabs(_x - _y) for _x, _y in zip(x,y)])
n = int(input())
x = [int(i) for i in input().split()]
y = [int(i) for i in input().split()]
print(mink(x,y,1))
print(mink(x,y,2))
print(mink(x,y,3))
print(mink_i(x,y))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import sys

def calculate(x):
    X = int(x)
    return X * X * X

if __name__ == '__main__':
    
    param = sys.argv

    print(calculate(param[1]))

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

def calculate(x):
    X = int(x)
    return X * X * X

n = int(input())

print(calculate(n))
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

import numpy as np

r = float( input() )

area = r * r * np.pi
circle = 2 * r * np.pi

print(format(area, '.10f'), format(circle, '.10f'))

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

import math

r = float( input() )

area = r * r * math.pi
circle = 2 * r * math.pi

print(format(area, '.10f'), format(circle, '.10f'))
Buggy python submission (verdict: Time Limit Exceeded):
while True:
        try:
            list = [int(x) for x in raw_input().split(" ")]
            list.sort(lambda x, y: y - x)
            gcd = lcm = 0
            m = list[0]
            n = list[1]
            while True:
                r = m%n
                if r == 0:
                    gcd = n
                    break
                m = n
                n = r
            num = list[0]
            while True:
                if num%list[0] == num%list[1] == 0:
                    lcm = num
                    break
                num += gcd
            print(str(gcd) + " " + str(lcm))
        except EOFError:
            break

Fixed submission:
# -*- coding: utf-8 -*-
while True:
    try:
        list = [int(x) for x in raw_input().split(" ")]
        list.sort(lambda x, y: y - x)
        gcd = lcm = 0
        m = list[0]
        n = list[1]
        while True:
            r = m%n
            if r == 0:
                gcd = n
                break
            m = n
            n = r
        lcm = list[0] * list[1] / gcd
        print(str(gcd) + " " + str(lcm))
    except EOFError:
        break

Buggy python submission (verdict: Runtime Error):
    while True:
        try:
            list = [int(x) for x in raw_input().split(" ")]
            list.sort(lambda x, y: y - x)
            gcd = lcm = 0
            m = list[0]
            n = list[1]
            while True:
                r = m%n
                if r == 0:
                    gcd = n
                    break
                m = n
                n = r
            lcm = list[0] * list[1] / gcd
            print(str(gcd) + " " + str(lcm))
        except EOFError:
            break

Fixed submission:
# -*- coding: utf-8 -*-
while True:
    try:
        list = [int(x) for x in raw_input().split(" ")]
        list.sort(lambda x, y: y - x)
        gcd = lcm = 0
        m = list[0]
        n = list[1]
        while True:
            r = m%n
            if r == 0:
                gcd = n
                break
            m = n
            n = r
        lcm = list[0] * list[1] / gcd
        print(str(gcd) + " " + str(lcm))
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

while True:
    try:
        n = int(raw_input())
        list1 = range(2, n)
        list2 = []
        while True:
            i = list1.pop(0)
            list2.append(i)
            for x in list1:
                if x % i == 0:
                    list1.remove(x)
            if i**2 > list1[::-1][0]:
                break

        print(len(list2 + list1))
    except EOFError:
        break

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

list = [1]*1000000
list[0] = 0
list[1] = 0
for i in range(1, 1000000):
    if list[i] == 1:
        for j in range(i**2, 1000000, i):
            list[j] = 0

for i in range(2, 1000000):
    list[i] += list[i -1]
while True:
    try:
        n = int(raw_input())
        print(list[n])
    except EOFError:
        break

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

while True:
    try:
        n = int(raw_input())
        if n < 3:
            print(0)
            continue
        list1 = range(2, n)
        list2 = []
        while True:
            i = list1.pop(0)
            list2.append(i)
            for x in list1:
                if x % i == 0:
                    list1.remove(x)
            if i**2 > list1[::-1][0]:
                break
        print(len(list2 + list1))
    except EOFError:
        break

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

list = [1]*1000000
list[0] = 0
list[1] = 0
for i in range(1, 1000000):
    if list[i] == 1:
        for j in range(i**2, 1000000, i):
            list[j] = 0

for i in range(2, 1000000):
    list[i] += list[i -1]
while True:
    try:
        n = int(raw_input())
        print(list[n])
    except EOFError:
        break

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

while True:
    try:
        n = int(raw_input())
        if n < 2:
            print(0)
            continue
        list1 = range(2, n + 1)
        list2 = []
        while True:
            i = list1.pop(0)
            list2.append(i)
            for x in list1:
                if x % i == 0:
                    list1.remove(x)
            if len(list1) == 0:
                break
            if i**2 > sorted(list1,lambda n1, n2:n2 - n1)[0]:
                break
        print(len(list2 + list1))
    except EOFError:
        break

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

list = [1]*1000000
list[0] = 0
list[1] = 0
for i in range(1, 1000000):
    if list[i] == 1:
        for j in range(i**2, 1000000, i):
            list[j] = 0

for i in range(2, 1000000):
    list[i] += list[i -1]
while True:
    try:
        n = int(raw_input())
        print(list[n])
    except EOFError:
        break
Buggy python submission (verdict: Runtime Error):
import sys

input_list = list()
for i in sys.stdin.readlines():
    input_list.append(int(i))

for i in sorted(input_list, reversed=True)[:3]:
    print i

Fixed submission:
import sys

input_list = list()

for i in sys.stdin.readlines():
    i = i.strip()
    i = int(i)
    input_list.append(i)

for i in sorted(input_list, reverse=True)[:3]:
    print i
Buggy python submission (verdict: Runtime Error):
import sys

nums = map(int, sys.stdin.readline().strip().split())
print " ".join(sorted(nums, reverse=True))

Fixed submission:
import sys

nums = map(int, sys.stdin.readline().strip().split())

print " ".join(map(str,sorted(nums)))

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

nums = map(int, sys.stdin.readline().strip().split())

print " ".join(sorted(nums, reverse=True))

Fixed submission:
import sys

nums = map(int, sys.stdin.readline().strip().split())

print " ".join(map(str,sorted(nums)))
Buggy python submission (verdict: Runtime Error):
import sys

for line in sys.stdin.readlines():
  line = line.strip()
  line = map(int, line)
  if line[0] == 0 and line[1] == 0:
    break
  else:
    print " ".join(map(str, sorted(line)))

Fixed submission:
import sys

for line in sys.stdin.readlines():
  line = line.strip()
  line = map(int, line.split())
  if line[0] == 0 and line[1] == 0:
    break
  else:
    print " ".join(map(str, sorted(line)))
Buggy python submission (verdict: Runtime Error):
import sys;n=sys.stdin.readline();a=map(int,sys.stdin.readline().strip().split());print " ".join(reversed(a))

Fixed submission:
import sys;n=sys.stdin.readline();a=map(int,sys.stdin.readline().strip().split());print " ".join(map(str, reversed(a)))
Buggy python submission (verdict: Runtime Error):
import sys

for line in sys.stdin.readlines():
  line = line.strip()
  H, W = map(int, line.split())
  if H == 0 and W == 0:
    break
  else:
    for i in xrange(H):
      if i % 2 == 0:
        print "".join([x%2?"#":"." for x in xrange(W)])
      else:
        print "".join([x%2?".":"#" for x in xrange(W)])
    else:
      print

Fixed submission:
import sys

for line in sys.stdin.readlines():
  line = line.strip()
  H, W = map(int, line.split())
  if H == 0 and W == 0:
    break
  else:
    for i in xrange(H):
      if i % 2 == 0:
        print "".join(["#" if x %2 == 0 else "." for x in xrange(W)])
      else:
        print "".join(["." if x % 2 == 0 else "#" for x in xrange(W)])
    else:
      print
Buggy python submission (verdict: Runtime Error):
while True:
  count = int(input())
  for a in range(count):
    q,w =int(input()),int(input())
    t=q+w
    if t >10**80:
      print "overflow"
    else:
      print t

Fixed submission:
count =int(input())
for a in range(count):
  x,y=int(input()),int(input())
  ans = str(x+y)
  if len(ans) >80:print "overflow"
  else:
    print ans
Buggy python submission (verdict: Runtime Error):
while True:
  try:
    a,b,c = map(str,raw_input().split())
    b,c=a[1],a[2]
    print "%s %d %d" %(a,b+c,200*b+300+c)
  except EOFError:
    break

Fixed submission:
while True:
 try:
  a = map(str,raw_input().split())
  s = int(a[1])+int(a[2])
  d = int(a[1])*200+int(a[2])*300
  print a[0],s,d
 except EOFError: break
 except IndexError: break

Buggy python submission (verdict: Runtime Error):
while True:
  try:
    a = [10000]
    a,b,c = map(str,raw_input().split())
    b,c=a[1],a[2]
    print "%s %d %d" %(a,b+c,200*b+300+c)
  except EOFError:
    break

Fixed submission:
while True:
 try:
  a = map(str,raw_input().split())
  s = int(a[1])+int(a[2])
  d = int(a[1])*200+int(a[2])*300
  print a[0],s,d
 except EOFError: break
 except IndexError: break

Buggy python submission (verdict: Runtime Error):
while True:
  try:
    a,b,c= [10000],[10000],[10000]
    a,b,c = map(str,raw_input().split())
    b,c=a[1],a[2]
    print "%s %d %d" %(a,b+c,200*b+300+c)
  except EOFError:
    break

Fixed submission:
while True:
 try:
  a = map(str,raw_input().split())
  s = int(a[1])+int(a[2])
  d = int(a[1])*200+int(a[2])*300
  print a[0],s,d
 except EOFError: break
 except IndexError: break
Buggy python submission (verdict: Runtime Error):
while True:
 aw=[]
 ar = raw_input()
 if ar[0] ==0 and ar[1] ==0 and ar[2] ==0: break
 else:
  hit=0
  blo=0
  for t in range(5,9):
    aw.append(ar[t])
  for t in range(0,4):
    if ar[t] == aw[t]: hit+=1
  for t in range(0,4):
    for y in range(0,4):
      if ar[t] == aw[y]:
        if t == y: break
        else: blo +=1
  print hit,blo

Fixed submission:
while True:
  a = raw_input()
  if int(a[0]) == 0 and int(a[2]) == 0: break
  b =[]
  hit=0
  blow=0
  for i in range(5,9):
    b.append(a[i])
  for x in range(0,4):
    for y in range(0,4):
      if a[x] == b[y]:
        if x == y:
          hit +=1
        else: blow +=1
  print hit,blow
Buggy python submission (verdict: Runtime Error):
for i in range(int(raw_input())):
    n = [int(x) for x in raw_input().split()]
    n.sort(reverse=True)
    if n[0]**2 == n[1]**2 + n[2]**2:
        print "

Fixed submission:
for i in range(int(raw_input())):
    n = [int(x) for x in raw_input().split()]
    n.sort(reverse=True)
    if n[0]**2 == n[1]**2 + n[2]**2:
        print "YES"
    else:
        print "NO"
Buggy python submission (verdict: Runtime Error):
import sys
for x in sys.stdin.readlines():
    n = [int(y) for y in x.split()]

    print "%.3f %.3f" % ((n[2]*n[4]-n[1]*n[5])/(n[0]*n[3]-n[1]*n[3]),(n[5]*n[0]-n[2]*n[3])/(n[0]*n[4]-n[3]*n[1]))

Fixed submission:
import sys
for x in sys.stdin.readlines():
    n = [float(y) for y in x.split()]

    print "%.3f %.3f" % ((n[2]*n[4]-n[1]*n[5])/(n[0]*n[4]-n[1]*n[3])+0,(n[5]*n[0]-n[2]*n[3])/(n[0]*n[4]-n[3]*n[1])+0)

Buggy python submission (verdict: Runtime Error):
import sys
for x in sys.stdin.readlines():
    n = [int(y) for y in x.split()]

    print "%.3f %.3f" % ((n[2]*n[4]-n[1]*n[5])/(n[0]*n[3]-n[1]*n[3]),(n[5]*n[0]-n[2]*n[3])/(n[0]*n[4]-n[3]*n[1]))

Fixed submission:
import sys
for x in sys.stdin.readlines():
    n = [float(y) for y in x.split()]

    print "%.3f %.3f" % ((n[2]*n[4]-n[1]*n[5])/(n[0]*n[4]-n[1]*n[3])+0,(n[5]*n[0]-n[2]*n[3])/(n[0]*n[4]-n[3]*n[1])+0)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

for i in sys.stdin.readlines():
    n=int(i)
    list = [p for p in range(2,n) if 0 not in [p%d for d in range(2,p)]]

    print len(list)

Fixed submission:
import sys

list = [1]*1000000
list[0]=0
list[1]=0
for i in range(1,1000000):
    if list[i]==1:
        for j in range(i**2, 1000000, i):
            list[j]=0
for i in range(2, 1000000):
    list[i]+=list[i-1]
for l in sys.stdin:
    print list[int(l)]
Buggy python submission (verdict: Runtime Error):
import sys
list=[]
for i in sys.stdin.readlines():
    if int(i) != 0:
        list.append(int(i))
    else:
        print list.pop()

Fixed submission:
import sys
list=[]
for i in sys.stdin:
    if i.strip() != '0':
        list.append(i.strip())
    else:
        print list.pop()

Buggy python submission (verdict: Runtime Error):
import sys
list=[]
for i in sys.stdin.readlines():
    if float(i) != 0:
        list.append(float(i))
    else:
        print int(list.pop())

Fixed submission:
import sys
list=[]
for i in sys.stdin:
    if i.strip() != '0':
        list.append(i.strip())
    else:
        print list.pop()
Buggy python submission (verdict: Runtime Error):
import sys
ds = int(raw_input())
list =[int(x) for x in sys.stdin]
print list
for i in xrange(ds):
    print str(list[i*2]+list[i*2+1])

Fixed submission:
ds = int(raw_input())
for i in xrange(ds):
    x=int(raw_input())
    y=int(raw_input())
    sum = str(x+y)
    if len(sum) > 80:
        print "overflow"
    else:
        print sum

Buggy python submission (verdict: Runtime Error):
import sys
ds = int(raw_input())
list =[long(x) for x in sys.stdin]
print list
for i in xrange(ds):
    print str(list[i*2]+list[i*2+1])

Fixed submission:
ds = int(raw_input())
for i in xrange(ds):
    x=int(raw_input())
    y=int(raw_input())
    sum = str(x+y)
    if len(sum) > 80:
        print "overflow"
    else:
        print sum

Buggy python submission (verdict: Runtime Error):
import sys
ds = int(raw_input())
list =[int(x) for x in sys.stdin.readlines()]
print list
for i in xrange(ds):
    print str(list[i*2]+list[i*2+1])

Fixed submission:
ds = int(raw_input())
for i in xrange(ds):
    x=int(raw_input())
    y=int(raw_input())
    sum = str(x+y)
    if len(sum) > 80:
        print "overflow"
    else:
        print sum

Buggy python submission (verdict: Runtime Error):
import sys
ds = int(raw_input())
list =[long(x.strip()) for x in sys.stdin.readlines()]
print list
for i in xrange(ds):
    sum = str(list[i*2]+list[i*2+1])
    if len(sum) > 80:
        print "overflow"
    else:
        print sum

Fixed submission:
ds = int(raw_input())
for i in xrange(ds):
    x=int(raw_input())
    y=int(raw_input())
    sum = str(x+y)
    if len(sum) > 80:
        print "overflow"
    else:
        print sum
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8


def count_pattern(i):
    n = 0
    for a in xrange(10):
        for b in xrange(10):
            for c in xrange(10):
                for d in xrange(10):
                    if (a + b + c + d) == i:
                        n += 1
    return n


def main():
    while 1:
        s = raw_input()
        if s == "":
            return
        print count_pattern(int(s))


if __name__ == '__main__':
    main()

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


def count_pattern(i):
    n = 0
    for a in xrange(10):
        for b in xrange(10):
            for c in xrange(10):
                for d in xrange(10):
                    if (a + b + c + d) == i:
                        n += 1
    return n


def main():
    while 1:
        try:
            s = raw_input()
        except EOFError:
            return
        print count_pattern(int(s))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

import math


def main():
    param = int(raw_input())
    print "%1.6f %1.6f" % (param * param * math.pi, param * 2 * math.pi)

if __name__ == '__main__':
    main()

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

import math


def main():
    param = float(raw_input())
    print "%1.6f %1.6f" % (param * param * math.pi, param * 2 * math.pi)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

import math


def main():
    x1, y1, x2, y2 = [int(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()

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

import math


def main():
    x1, y1, x2, y2 = [float(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print "%1.8f" % math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

import math


def main():
    x1, y1, x2, y2 = [int(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print "%1.5f" % math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()

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

import math


def main():
    x1, y1, x2, y2 = [float(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print "%1.8f" % math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
#!/usr/bin/env python
# coding: utf-8

import math


def main():
    x1, y1, x2, y2 = [int(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print "%1.8f" % math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()

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

import math


def main():
    x1, y1, x2, y2 = [float(i) for i in raw_input().split(" ")]
    if x1 < x2:
        x1, x2 = x2, x1
    w = x1 - x2
    if y1 < y2:
        y1, y2 = y2, y1
    h = y1 - y2
    print "%1.8f" % math.sqrt(w ** 2 + h ** 2)

if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
a = 1
b = 1
while True:
	if a != 10:
		while True:
			print(str(a) + 'x' + str(b) + '=' + str(a*b))
			b += 1
			if b != 10:
				continue
			else:
				b = 1
				a += 1
				break
		continue
	else:
	break

Fixed submission:
a = 1
b = 1
while True:
	if a != 10:
		while True:
			print(str(a) + 'x' + str(b) + '=' + str(a*b))
			b += 1
			if b != 10:
				continue
			else:
				b = 1
				a += 1
				break
		continue
	else:
		break
Buggy python submission (verdict: Runtime Error):
x = []
a = 1
while True:
	if a != 10:
		x.append(int(raw_input()))
		a += 1
		continue
	else:
		break
x.sort()
print x[9]
print x[8]
print x[7]

Fixed submission:
x = []
a = 1
while True:
	if a != 11:
		x.append(int(raw_input()))
		a += 1
		continue
	else:
		break
x.sort()
print x[9]
print x[8]
print x[7]
Buggy python submission (verdict: Runtime Error):
a = int(input())
b = 1
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if a*2 + b*2 = c*2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Fixed submission:
for val in range(input()):
	x = map(int,raw_input().split(' '))
	x.sort()
	if x[0]**2+x[1]**2==x[2]**2: print 'YES'
	else: print 'NO'

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = 1
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]*2 + x[1]*2 = x[2]*2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Fixed submission:
for val in range(input()):
	x = map(int,raw_input().split(' '))
	x.sort()
	if x[0]**2+x[1]**2==x[2]**2: print 'YES'
	else: print 'NO'

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 = x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Fixed submission:
for val in range(input()):
	x = map(int,raw_input().split(' '))
	x.sort()
	if x[0]**2+x[1]**2==x[2]**2: print 'YES'
	else: print 'NO'

Buggy python submission (verdict: Runtime Error):
a = int(input())
b = int(1)
while True:
	if b < a+1:
		x = map(int,input().split(' '))
		x.sort()
		if x[0]**2 + x[1]**2 == x[2]**2:
			print('YES')
		else:
			print('NO')
		b += 1
		continue
	else:
		break

Fixed submission:
for val in range(input()):
	x = map(int,raw_input().split(' '))
	x.sort()
	if x[0]**2+x[1]**2==x[2]**2: print 'YES'
	else: print 'NO'
Buggy python submission (verdict: Runtime Error):
x = map(int,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
print round((c*e-b*f)/(a*e-d*b),4),round((c*d-a*f)/(b*d-a*e),4)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break

Buggy python submission (verdict: Runtime Error):
x = map(float,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
print round((c*e-b*f)/(a*e-d*b),4),round((c*d-a*f)/(b*d-a*e),4)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break

Buggy python submission (verdict: Runtime Error):
x = map(float,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
g = (c*e-b*f)/(a*e-d*b)
h = (c*d-a*f)/(b*d-a*e)
print round(g,4),round(h,4)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break

Buggy python submission (verdict: Runtime Error):
x = map(float,input().split(' '))
a = x[0]
b = x[1]
c = x[2]
d = x[3]
e = x[4]
f = x[5]
g = (c*e-b*f)/(a*e-d*b)
h = (c*d-a*f)/(b*d-a*e)
print round(g,3),round(h,3)

Fixed submission:
while True:
	try:
		a,b,c,d,e,f = map(float,raw_input().split(' '))
		p = round((c*e-b*f)/(a*e-b*d),4)
		q = round((a*f-c*d)/(a*e-b*d),4)
		x = '%.3f' % p
		y = '%.3f' % q
		if str(x) == '-0.000': x = '%.3f' % 0.000
		if str(y) == '-0.000': y = '%.3f' % 0.000
		print x,y
	except: break