s_id
stringlengths
10
10
p_id
stringlengths
6
6
u_id
stringlengths
10
10
date
stringlengths
10
10
language
stringclasses
1 value
original_language
stringclasses
11 values
filename_ext
stringclasses
1 value
status
stringclasses
1 value
cpu_time
stringlengths
1
5
memory
stringlengths
1
7
code_size
stringlengths
1
6
code
stringlengths
1
539k
s608866237
p00004
u223481558
1509966758
Python
Python3
py
Runtime Error
0
0
286
# coding: utf-8 # Your code here! import numpy as np while True: try: a,b,c,d,e,f = map(int, input().split()) x,y=map(float,np.dot(np.linalg.inv(np.array([a,b,d,e]).reshape(2,2)),np.array([c,f]))) print('%.3f %.3f' % (x,y)) except: break
s568054693
p00004
u223481558
1509967007
Python
Python3
py
Runtime Error
0
0
280
# coding: utf-8 # Your code here! import numpy as np while True: try: a,b,c,d,e,f = map(int, input().split()) l=np.dot(np.linalg.inv(np.array([a,b,d,e]).reshape(2,2)),np.array([c,f])) print('%.3f %.3f' % (l[0],l[1])) except: break
s376998823
p00004
u223481558
1509967614
Python
Python3
py
Runtime Error
0
0
332
# coding: utf-8 # Your code here! import numpy as np while True: try: s=input().split() l=[int(s[0]),int(s[1]),int(s[3]),int(s[4])] lb=[int(s[2]),int(s[5])] l=np.dot(np.linalg.inv(np.array(l).reshape(2,2)),np.array(lb)) print('%.3f %.3f' % (l[0],l[1])) except: break
s469188383
p00004
u616775713
1510235401
Python
Python
py
Runtime Error
0
0
128
for line in sys.stdin: a,b,c,d,e,f = map(float, raw_input().split()) print round((ce-bf)/(ae-bd),3),round((af-cd)/(ae-bd),3)
s650933481
p00004
u616775713
1510235589
Python
Python
py
Runtime Error
0
0
136
for line in sys.stdin: a,b,c,d,e,f = map(float, raw_input().split()) print round((c*e-b*f)/(a*e-b*d),3),round((a*f-c*d)/(a*e-b*d),3)
s323984418
p00004
u616775713
1510236580
Python
Python
py
Runtime Error
0
0
223
import sys for line in sys.stdin: l = [] l = map(float,raw_input().split()) a = l[0] b = l[1] c = l[2] d = l[3] e = l[4] f = l[5] print a,b,c,d,e,f print round((c*e-b*f)/(a*e-b*d),3),round((a*f-c*d)/(a*e-b*d),3)
s109067666
p00004
u776758454
1510462874
Python
Python3
py
Runtime Error
0
0
504
import sys from decimal import Decimal def main(): #input_strings = sys.stdin.readlines() for coef_and_cons in input_strings: a, b, c, d ,e, f = map(Decimal, coef_and_cons.split()) print([a,b,c,d,e,f]) x = (f/e - c/b) / (d/e - a/b) y = (f/d - c/a) / (e/d - b/a) print('%.3f %.3f' % (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'), y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') ) ) main()
s870837210
p00004
u776758454
1510462900
Python
Python3
py
Runtime Error
0
0
475
import sys from decimal import Decimal def main(): #input_strings = sys.stdin.readlines() for coef_and_cons in input_strings: a, b, c, d ,e, f = map(Decimal, coef_and_cons.split()) x = (f/e - c/b) / (d/e - a/b) y = (f/d - c/a) / (e/d - b/a) print('%.3f %.3f' % (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'), y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') ) ) main()
s445216761
p00004
u776758454
1510462910
Python
Python3
py
Runtime Error
0
0
474
import sys from decimal import Decimal def main(): input_strings = sys.stdin.readlines() for coef_and_cons in input_strings: a, b, c, d ,e, f = map(Decimal, coef_and_cons.split()) x = (f/e - c/b) / (d/e - a/b) y = (f/d - c/a) / (e/d - b/a) print('%.3f %.3f' % (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'), y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') ) ) main()
s482421438
p00004
u776758454
1510463046
Python
Python3
py
Runtime Error
0
0
474
import sys from decimal import Decimal def main(): input_strings = sys.stdin.readlines() for coef_and_cons in input_strings: a, b, c, d ,e, f = map(Decimal, coef_and_cons.split()) x = (f/e - c/b) / (d/e - a/b) y = (f/d - c/a) / (e/d - b/a) print('%.3f %.3f' % (x.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN'), y.quantize(Decimal('0.001'), rounding='ROUND_HALF_DOWN') ) ) main()
s769160067
p00004
u776758454
1510651220
Python
Python3
py
Runtime Error
0
0
912
import sys from decimal import Decimal from fractions import Fraction def main(): #input_strings = sys.stdin.readlines() for matrix_string in input_strings: matrix = list(map(Fraction, list(matrix_string.split()))) if matrix[0] == 0: matrix = matrix[3:] + matrix[:3] matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:] matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:]))) matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:])) matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:] matrix = list(map(float, matrix)) matrix = list(map(Decimal, matrix)) matrix = list(map(lambda x: x.quantize(Decimal('.001'), rounding='ROUND_HALF_UP'), matrix)) print('%.3f %.3f' % (matrix[2], matrix[5])) main()
s138423789
p00004
u776758454
1510651300
Python
Python3
py
Runtime Error
0
0
964
import sys from decimal import Decimal from fractions import Fraction def main(): #input_strings = sys.stdin.readlines() for matrix_string in input_strings: matrix = list(map(Fraction, list(matrix_string.split()))) if matrix[0] == 0: matrix = matrix[3:] + matrix[:3] matrix = list(map(lambda x: x / matrix[0], matrix[:3])) + matrix[3:] matrix = matrix[:3] + list(map(lambda x: x[1] - matrix[3] * x[0], zip(matrix[:3], matrix[3:]))) matrix = matrix[:3] + list(map(lambda x: x / matrix[4], matrix[3:])) matrix = list(map(lambda x: x[0] - matrix[1] * x[1], zip(matrix[:3], matrix[3:]))) + matrix[3:] matrix = list(map(float, matrix)) matrix = list(map(Decimal, matrix)) matrix = list(map(lambda x: x.quantize(Decimal('.001'), rounding='ROUND_HALF_UP'), matrix)) matrix = list(map(lambda x: x + 0, matrix)) print('%.3f %.3f' % (matrix[2], matrix[5])) main()
s121500953
p00004
u488038316
1510906452
Python
Python3
py
Runtime Error
0
0
345
# -*-coding:utf-8 import numpy as np def main(): tokens = list(map(float, input().split(' '))) A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]]) B = np.array([tokens[2],tokens[5]]) X = np.linalg.solve(A, B) print( '%.3f %0.3f' % (X[0], X[1]) ) if __name__ == '__main__': for i in range(2): main()
s257238584
p00004
u488038316
1510906646
Python
Python3
py
Runtime Error
0
0
440
# -*-coding:utf-8 import numpy as np def main(): tokens = list(map(float, input().split(' '))) A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]]) B = np.array([tokens[2],tokens[5]]) X = np.linalg.solve(A, B) for i in range(2): if X[i] == -0.000: X[i] = abs(X[i]) print( '%.3f %0.3f' % (X[0], X[1]) ) return 0 if __name__ == '__main__': for i in range(2): main()
s649388524
p00004
u488038316
1510908340
Python
Python3
py
Runtime Error
0
0
485
# -*-coding:utf-8 import numpy as np def main(): tokens = raw_input().split(' ') for i in range(6): tokens[i] = int(tokens[i]) A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]]) B = np.array([tokens[2],tokens[5]]) X = np.linalg.solve(A, B) for i in range(2): if X[i] == -0.000: X[i] = abs(X[i]) print( '%.3f %0.3f' % (X[0], X[1]) ) return 0 if __name__ == '__main__': for i in range(2): main()
s297739259
p00004
u488038316
1510909293
Python
Python3
py
Runtime Error
0
0
461
# -*-coding:utf-8 import numpy as np def main(): line = input() tokens = list(map(float, line.strip().split())) A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]]) B = np.array([tokens[2],tokens[5]]) X = np.linalg.solve(A, B) for i in range(2): if X[i] == -0.000: X[i] = abs(X[i]) print( '%.3f %0.3f' % (X[0], X[1]) ) return 0 if __name__ == '__main__': for i in range(2): main()
s120597329
p00004
u488038316
1510909314
Python
Python
py
Runtime Error
0
0
461
# -*-coding:utf-8 import numpy as np def main(): line = input() tokens = list(map(float, line.strip().split())) A = np.array([[tokens[0],tokens[1]] ,[tokens[3],tokens[4]]]) B = np.array([tokens[2],tokens[5]]) X = np.linalg.solve(A, B) for i in range(2): if X[i] == -0.000: X[i] = abs(X[i]) print( '%.3f %0.3f' % (X[0], X[1]) ) return 0 if __name__ == '__main__': for i in range(2): main()
s867770652
p00004
u319774425
1511857008
Python
Python
py
Runtime Error
0
0
408
import fileinput import sys for i in fileinput.input(): a.append(i) for i in a: b = i.split() b = map(float, b) b_a = b[0] b_b = b[1] b_c = b[2] b_d = b[3] b_e - b[4] b_f = b[5] b_d = b_a b_e = b_a/b_d * b_e b_f = b_a/b_d * b_f x = (b_c - b_f)/(b_b - b_e) y = (b_c - x * b_b)/b_a print round(x, 3) print round(y, 3) sys.exit(None)
s209040242
p00004
u319774425
1511858800
Python
Python
py
Runtime Error
0
0
434
def solver(a, b, c, d, e, f): answer = [] m = a / d d = d * m e = e * m f = f * m y = (c - f)/(b - e) x = (c - b * y)/a answer.append(x) answer.append(y) return answer while 1: try: p_1, p_2, p_3, p_4, p_5, p_6 = map(float, raw_input().split()) ans = [] ans = solver(p_1, p_2, p_3, p_4, p_5, p_6) print "%.3f %.3f" % (ans[0], ans[1]) except:
s178849916
p00004
u095097138
1512723745
Python
Python3
py
Runtime Error
0
0
396
import argparse parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('n', nargs='+', type=int, action='store') args = parser.parse_args() a = args.n[0] b = args.n[1] c = args.n[2] d = args.n[3] e = args.n[4] f = args.n[5] x = abs((c * e) - (f * b)) / abs((b * d) - (a * e)) y = abs((c * d) - (f * e)) / abs((b * d) - (a * e)) print('{} {}'.format(x, y))
s519354238
p00004
u095097138
1512724842
Python
Python3
py
Runtime Error
0
0
396
import argparse parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('n', nargs='+', type=int, action='store') args = parser.parse_args() a = args.n[0] b = args.n[1] c = args.n[2] d = args.n[3] e = args.n[4] f = args.n[5] x = abs((c * e) - (f * b)) / abs((b * d) - (a * e)) y = abs((c * d) - (f * e)) / abs((b * d) - (a * e)) print('{} {}'.format(x, y))
s482693779
p00004
u779220087
1513096765
Python
Python3
py
Runtime Error
0
0
374
if __name__ == "__main__": for line in fileinput.input(): a = float(line.split(" ")[0]) b = float(line.split(" ")[1]) c = float(line.split(" ")[2]) d = float(line.split(" ")[3]) e = float(line.split(" ")[4]) f = float(line.split(" ")[5]) x = (e*c-b*f)/(a*e-b*d) y = (-d*c+a*f)/(a*e-b*d) print(x,y)
s104158854
p00004
u846136461
1513434749
Python
Python
py
Runtime Error
0
0
322
# coding: utf-8 while True: data = map(int, raw_input().split()) a = data[0] b = data[1] c = data[2] d = data[3] e = data[4] f = data[5] x = (c*e-b*f)*1.0 / (a*e-b*d) if x == -0.000: x = 0.000 if b != 0: y = (c-a*x)/b else: y = (f-d*x)/e if y == -0.000: y = 0.000 print("{:.3f} {:.3f}".format(x,y))
s150399476
p00004
u846136461
1513434889
Python
Python
py
Runtime Error
0
0
322
# coding: utf-8 while True: data = map(int, raw_input().split()) a = data[0] b = data[1] c = data[2] d = data[3] e = data[4] f = data[5] x = (c*e-b*f)*1.0 / (a*e-b*d) if x == -0.000: x = 0.000 if b != 0: y = (c-a*x)/b else: y = (f-d*x)/e if y == -0.000: y = 0.000 print("{:.3f} {:.3f}".format(x,y))
s980910776
p00004
u480287988
1514095503
Python
Python3
py
Runtime Error
0
0
252
import sys import numpy as np for i in sys.stdin: a,b,c,d,e,f=list(map(float, i.split())) A=np.matrix([[a,b],[d,e]]) inv_A = np.linalg.inv(A) P=np.matrix([[c],[f]]) X=inv_A.dot(P) print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))
s966726989
p00004
u480287988
1514095812
Python
Python3
py
Runtime Error
0
0
252
import sys import numpy as np for i in sys.stdin: a,b,c,d,e,f=list(map(float, i.split())) A=np.matrix([[a,b],[d,e]]) inv_A = np.linalg.inv(A) P=np.matrix([[c],[f]]) X=inv_A.dot(P) print("{0:.3f} {1:.3f}".format(X[0,0], X[1,0]))
s925082788
p00004
u764789069
1514118699
Python
Python
py
Runtime Error
0
0
307
while True: try: a,b,c,d,e,f=map(int,raw_input().split()) if a*d-b*c==0: print "not exist answer" else: x = (c*e-b*f) / (a*e-b*d) y = (a*f-c*d) / (a*e-b*d) print ('%.3f' % round(x,3), ('%.3f' % round(y,3)) except: break
s309809646
p00004
u600263347
1514273249
Python
Python3
py
Runtime Error
0
0
365
def main(): while True: try: Array = list(map(int,input().split())) x = (Array[2]-(Array[1]/Array[4])*Array[5])/(Array[0]-(Array[1]/Array[4])*Array[3]) y = (Array[5]-Array[3]*x)/Array[4] except EOFError: break print("{0:.3f} {1:.3f} ".format(x,y)) if __name__ == '__main__': main()
s005377108
p00004
u585035894
1514630221
Python
Python3
py
Runtime Error
0
0
296
import itertools, sys d = {i: 0 for i in range(51)} for i in itertools.combinations_with_replacement(range(0,10), 4): if i[0] == i[1] == i[2] == i[3]: continue d[sum(i)] += 1 for i in map(int, sys.stdin): if i / 4 == 0: print(d[i]*4+1) else: print(d[i]*4)
s816478435
p00004
u803045841
1516560289
Python
Python3
py
Runtime Error
0
0
164
import sys for e in sys.stdin: a, b, c, d, e, f = map(int, e.split()) a * (e*y-f) / d + b * y = c x = (e*y-f) / d print round(x, 3)+' '+round(y, 3)
s419085566
p00004
u803045841
1516560358
Python
Python3
py
Runtime Error
0
0
166
import sys for e in sys.stdin: a, b, c, d, e, f = map(int, e.split()) a * (e*y-f) / d + b * y = c x = (e*y-f) / d print (round(x, 3)+' '+round(y, 3))
s383001316
p00004
u803045841
1516560474
Python
Python3
py
Runtime Error
0
0
168
import sys for e in sys.stdin: a, b, c, d, e, f = map(int, e.split()) a * (-e*y+f) / d + b * y = c -x = (e*y-f) / d print (round(x, 3)+' '+round(y, 3))
s117395668
p00004
u803045841
1516560606
Python
Python3
py
Runtime Error
0
0
161
import sys for e in sys.stdin: a, b, c, d, e, f = map(int, e.split()) y=(c*d-a*f)/(b*d-a*e) x = (e*y-f) / -d print (round(x, 3)+' '+round(y, 3))
s667607793
p00004
u803045841
1516560779
Python
Python3
py
Runtime Error
0
0
158
import sys for e in sys.stdin: a, b, c, d, e, f = map(int, e.split()) y=(c*d-a*f)/(b*d-a*e) x = (c-b*y)/a print (round(x, 3)+' '+round(y, 3))
s146889010
p00004
u613534067
1519018700
Python
Python3
py
Runtime Error
0
0
605
import sys import numpy as np #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える line = sys.stdin.readlines() #print(line) for i in line: cnt = 0 idx = 0 a = np.array([0.0, 0.0, 0.0, 0.0]) b = np.array([0.0, 0.0]) for k in list(map(float, i.split(" "))): if cnt == 2: b[0] = k idx -= 1 elif cnt == 5: b[1] = k else: a[idx] = k cnt += 1 idx += 1 #print(a, b) a = a.reshape(2, 2) x = np.linalg.solve(a, b) print('{0: 0.3f} {1: 0.3f}'.format(x[0], x[1]))
s573855141
p00004
u613534067
1519018896
Python
Python3
py
Runtime Error
0
0
603
import sys import numpy as np #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える line = sys.stdin.readlines() #print(line) for i in line: cnt = 0 idx = 0 a = np.array([0.0, 0.0, 0.0, 0.0]) b = np.array([0.0, 0.0]) for k in list(map(float, i.split(" "))): if cnt == 2: b[0] = k idx -= 1 elif cnt == 5: b[1] = k else: a[idx] = k cnt += 1 idx += 1 #print(a, b) a = a.reshape(2, 2) x = np.linalg.solve(a, b) print('{0: .3f} {1: .3f}'.format(x[0], x[1]))
s875431776
p00004
u613534067
1519019471
Python
Python3
py
Runtime Error
0
0
643
import sys import numpy as np #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える while True: line = sys.stdin.readline() if line is '': break #print(line) cnt = 0 idx = 0 a = np.array([0.0, 0.0, 0.0, 0.0]) b = np.array([0.0, 0.0]) for k in list(map(float, line.split(" "))): if cnt == 2: b[0] = k idx -= 1 elif cnt == 5: b[1] = k else: a[idx] = k cnt += 1 idx += 1 #print(a, b) a = a.reshape(2, 2) x = np.linalg.solve(a, b) print('{0: .3f} {1: .3f}'.format(x[0], x[1]))
s915968211
p00004
u613534067
1520002354
Python
Python3
py
Runtime Error
0
0
552
import sys #import numpy as np # AOJではnumpy使えません #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える while True: line = sys.stdin.readline() if line is '': break #print(line) a = list(map(float, line.split(" "))) #print(a) tmp = a[0] for i in range(0, 3): a[i] = a[i] * a[3] for i in range(3, 6): a[i] = a[i] * tmp #print(a) y = (a[2] - a[5]) / (a[1] - a[4]) x = (a[2] - a[1] * y) / a[0] print("{0:0.3f}".format(x), "{0:0.3f}".format(y))
s567439283
p00004
u613534067
1520002637
Python
Python3
py
Runtime Error
0
0
479
import sys #import numpy as np # AOJではnumpy使えません #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える lines = sys.stdin.readlines() for line in lines: a = list(map(float, line.split(" "))) tmp = a[0] for i in range(0, 3): a[i] = a[i] * a[3] for i in range(3, 6): a[i] = a[i] * tmp y = (a[2] - a[5]) / (a[1] - a[4]) x = (a[2] - a[1] * y) / a[0] print("{0:0.3f}".format(x), "{0:0.3f}".format(y))
s079075057
p00004
u613534067
1520002840
Python
Python3
py
Runtime Error
0
0
469
import sys #import numpy as np # AOJではnumpy使えません #np.set_printoptions(formatter={'float': '{: 0.3f}'.format}) #桁を揃える lines = sys.stdin.readlines() for line in lines: a = list(map(float, line.split(" "))) tmp = a[0] for i in range(0, 3): a[i] = a[i] * a[3] for i in range(3, 6): a[i] = a[i] * tmp y = (a[2] - a[5]) / (a[1] - a[4]) x = (a[2] - a[1] * y) / a[0] print("{0:0.3f} {1:0.3f}".format(x, y))
s794959803
p00004
u613534067
1520002854
Python
Python3
py
Runtime Error
0
0
339
import sys lines = sys.stdin.readlines() for line in lines: a = list(map(float, line.split(" "))) tmp = a[0] for i in range(0, 3): a[i] = a[i] * a[3] for i in range(3, 6): a[i] = a[i] * tmp y = (a[2] - a[5]) / (a[1] - a[4]) x = (a[2] - a[1] * y) / a[0] print("{0:0.3f} {1:0.3f}".format(x, y))
s001090749
p00004
u613534067
1520002939
Python
Python3
py
Runtime Error
0
0
339
import sys lines = sys.stdin.readlines() for line in lines: a = list(map(float, line.split(" "))) tmp = a[0] for i in range(0, 3): a[i] = a[i] * a[3] for i in range(3, 6): a[i] = a[i] * tmp y = (a[2] - a[5]) / (a[1] - a[4]) x = (a[2] - a[1] * y) / a[0] print("{0:0.3f} {1:0.3f}".format(x, y))
s262645081
p00004
u120970792
1524833838
Python
Python3
py
Runtime Error
0
0
302
l = [[]] i = 0 y,x = [] while(True): try: l[i] = list(map(float, input().split())) i += 1 except: break for i in range(len(i)): a = l[i][0]/l[i][4] l[i] *= l[i] * a y[i] = (l[i][2]-l[i][5])/(l[i][1]-l[i][4]) x[i] = (l[i][2]-l[i][1]*y[i])/l[i][0]
s017844024
p00004
u120970792
1524836964
Python
Python3
py
Runtime Error
0
0
302
l = [[]] i = 0 y,x = [] while(True): try: l[i] = list(map(float, input().split())) i += 1 except: break for i in range(len(i)): a = l[i][0]/l[i][4] l[i] *= l[i] * a y[i] = (l[i][2]-l[i][5])/(l[i][1]-l[i][4]) x[i] = (l[i][2]-l[i][1]*y[i])/l[i][0]
s516660236
p00004
u120970792
1524836976
Python
Python3
py
Runtime Error
0
0
302
l = [[]] i = 0 y,x = [] while(True): try: l[i] = list(map(float, input().split())) i += 1 except: break for i in range(len(i)): a = l[i][0]/l[i][4] l[i] *= l[i] * a y[i] = (l[i][2]-l[i][5])/(l[i][1]-l[i][4]) x[i] = (l[i][2]-l[i][1]*y[i])/l[i][0]
s469869019
p00004
u533681846
1525021731
Python
Python3
py
Runtime Error
0
0
282
import numpy as np lst=[] while 1: try: lst.append(list(map(int, input().split()))) except EOFError: break for a in lst: A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x)
s760769135
p00004
u533681846
1525022169
Python
Python3
py
Runtime Error
0
0
275
import numpy as np while 1: try: a = list(map(float, input().split())) A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x) except EOFError: break
s337897652
p00004
u533681846
1525022314
Python
Python3
py
Runtime Error
0
0
283
import sys import numpy as np while 1: line = sys.stdin.readline() if line is '': break a = list(map(float, input().split())) A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x)
s015979155
p00004
u533681846
1525022542
Python
Python3
py
Runtime Error
0
0
284
import sys import numpy as np while 1: line = sys.stdin.readline() if line is ' ': break a = list(map(float, input().split())) A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x)
s209074043
p00004
u533681846
1525022584
Python
Python3
py
Runtime Error
0
0
275
import numpy as np while 1: try: a = list(map(float, input().split())) A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x) except EOFError: break
s958674838
p00004
u533681846
1525022604
Python
Python3
py
Runtime Error
0
0
266
import numpy as np while 1: try: a = list(map(float, input().split())) A = np.array([[a[0],a[1]], [a[3],a[4]]]) b = np.array([a[2],a[5]]) x = np.linalg.solve(A, b) print(x) except: break
s480166199
p00004
u533681846
1525023277
Python
Python3
py
Runtime Error
0
0
218
import sys while 1: line = sys.stdin.readline() if line is ' ': break a,b,c,d,e,f = map(float, input().split()) y=(c*d-a*f)/(b*d-a*e) x=(c-b*y)/a print("{0:.3f} {1:.3f}".format(x,y))
s443954602
p00004
u150984829
1525317592
Python
Python3
py
Runtime Error
0
0
121
import sys for e in sys.stdin: a,b,c,d,e,f=map(int,e.split()) y=(c*d-a*f)/(b*d-a*e) print(f'{(c-b*y)/a:.3f} {y:.3f}")
s148324567
p00004
u724548524
1525730290
Python
Python3
py
Runtime Error
0
0
225
import sys import numpy for i in sys.stdin: a, b, c, d, e, f = map(int, i.split()) print("{0:.3f} {1:.3f}".format(numpy.round((c * e - b * f) / (a * e - b * d), 3), numpy.round((c * d - a * f) / (b * d - a * e), 3)))
s276088111
p00004
u724548524
1525730676
Python
Python3
py
Runtime Error
0
0
214
import sys import numpy for i in sys.stdin: a, b, c, d, e, f = map(int, i.split()) x = (c * e - b * f) / (a * e - b * d) x = abs(x) if x < 10e-4 else x print("{:.3f} {:.3f}".format(x, (c - x) / b))
s249126437
p00004
u724548524
1525730920
Python
Python3
py
Runtime Error
0
0
286
import sys for i in sys.stdin: a, b, c, d, e, f = map(int, i.split()) x = (c * e - b * f) / (a * e - b * d) y = (c * d - a * f) / (b * d - a * e) x = abs(x) if x < 10e-4 else x y = abs(y) if y < 10e-4 else y print("{:.3f} {:.3f}".format(round(x,3), rount(y,3)))
s427758387
p00004
u724548524
1525731001
Python
Python3
py
Runtime Error
0
0
277
import sys for i in sys.stdin: a, b, c, d, e, f = map(int, i.split()) x = (c * e - b * f) / (a * e - b * d) y = (c * d - a * f) / (b * d - a * e) x = abs(x) if abs(x) < 10e-4 else x y = abs(y) if abs(y) < 10e-4 else y print("{:.3f} {:.3f}".format(x, y)
s031472624
p00004
u986478725
1527569027
Python
Python3
py
Runtime Error
0
0
682
# Vol0004. import sys def main(): data = [] lines = sys.stdin.readlines() for line in lines: data.append(line.split()) # スペース区切りで放り込む # ax + by = c, dx + ey = fの解は、 # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd). # これをround(float, 3)すれば答えが出る。 N = len(data) for i in range(N): det = data[i][0] * data[i][4] - data[i][1] * data[i][3] gx = data[i][2] * data[i][4] - data[i][1] * data[i][5] gy = data[i][0] * data[i][5] - data[i][2] * data[i][3] print(str(round(gx / det, 3)) + " " + str(round(gy / det, 3))) if __name__ == "__main__": main()
s938695192
p00004
u986478725
1527570235
Python
Python3
py
Runtime Error
0
0
1159
# Vol0004. import sys def main(): data = [] lines = sys.stdin.readlines() fp.close() for line in lines: data.append(line.split()) # スペース区切りで放り込む # ax + by = c, dx + ey = fの解は、 # x = (ce - bf) / (ae - bd), y = (af - cd) / (ae - bd). # これをround(float, 3)すれば答えが出る。 N = len(data) for i in range(N): for k in range(6): data[i][k] = int(data[i][k]) det = data[i][0] * data[i][4] - data[i][1] * data[i][3] gx = data[i][2] * data[i][4] - data[i][1] * data[i][5] gy = data[i][0] * data[i][5] - data[i][2] * data[i][3] if det < 0: det = -det; if gx != 0: gx = -gx if gy != 0: gy = -gy print("{0:.3f}".format(gx / det) + " " + "{0:.3f}".format(gy / det)) if __name__ == "__main__": main() # 補足、0.1とか0.22でも3桁目まで表示しないとWrongになる。 # 表示するにはprint("{0:.nf}".format(数))ってやる(nのところは桁数)。 # さらに、0を負の数で割ると表示が-0.000になってしまうのでそこの処理も重要。
s696215705
p00004
u480716860
1529643444
Python
Python3
py
Runtime Error
0
0
424
def ans(a, b, c, d, e, f): x = ((e*c - b*f)/(a*e-b*d)) y = ((-d*x + f)/e) x = "%.3f" % x y = "%.3f" % y return x, y sets = [] while True: try: line = list(map(int, input().split())) if(line[0] == " "): break; else: sets.append(line) except IndexError: break for i in sets: x, y = ans(i[0],i[1],i[2],i[3],i[4],i[5]) print(x, y)
s557225752
p00004
u480716860
1529643495
Python
Python3
py
Runtime Error
0
0
424
def ans(a, b, c, d, e, f): x = ((e*c - b*f)/(a*e-b*d)) y = ((-d*x + f)/e) x = "%.3f" % x y = "%.3f" % y return x, y sets = [] while True: try: line = list(map(int, input().split())) if(line[0] == " "): break; else: sets.append(line) except IndexError: break for i in sets: x, y = ans(i[0],i[1],i[2],i[3],i[4],i[5]) print(x, y)
s115125560
p00004
u480716860
1529643581
Python
Python3
py
Runtime Error
0
0
423
def ans(a, b, c, d, e, f): x = ((e*c - b*f)/(a*e-b*d)) y = ((-d*x + f)/e) x = "%.3f" % x y = "%.3f" % y return x, y sets = [] while True: try: line = list(map(int, input().split())) if(line[0] == " "): break; else: sets.append(line) except IndexError: break for i in sets: x, y = ans(i[0],i[1],i[2],i[3],i[4],i[5]) print(x, y)
s844581128
p00004
u894941280
1344732385
Python
Python
py
Runtime Error
0
2152
276
while True: try: q = map(int,raw_input().split(" ")) y = (-1*q[0]*q[5] + q[2] * q[3]) / (-1*q[0] * q[4] + q[1] * q[3]) x = (q[5]-q[4]* y)/ q[3] if x == -0 or y == -0 : x == 0 y == 0 print "%.3f %.3f" % (x,y) except EOFError: break
s659966677
p00004
u719737030
1350910659
Python
Python
py
Runtime Error
0
5948
193
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]))
s733822665
p00004
u719737030
1350911337
Python
Python
py
Runtime Error
0
5948
193
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]))
s598512375
p00004
u504990413
1352902963
Python
Python
py
Runtime Error
0
5036
270
while True: a = map(float, raw_input().split(' ')) if a[1]*a[3]-a[0]*a[4] == 0: print 'No answer' else: x = (a[1]*a[5]-a[2]*a[4])/(a[1]*a[3]-a[0]*a[4]) y = (a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]) print '%.3f %.3f ' % (x,y)
s715293989
p00004
u504990413
1352903250
Python
Python
py
Runtime Error
0
5036
354
while True: a = map(float, raw_input().split(' ')) if a[1]*a[3]-a[0]*a[4] == 0: print 'No answer' else: x = (a[1]*a[5]-a[2]*a[4])/(a[1]*a[3]-a[0]*a[4]) y = (a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]) if x == 0: x = abs(x) if y == 0: y = abs(y) print '%.3f %.3f ' % (x,y)
s786587056
p00004
u504990413
1352903551
Python
Python
py
Runtime Error
0
5036
257
while True: a = map(float, raw_input().split(' ')) x = (a[1]*a[5]-a[2]*a[4])/(a[1]*a[3]-a[0]*a[4]) y = (a[2]*a[3]-a[0]*a[5])/(a[1]*a[3]-a[0]*a[4]) if x == 0: x = abs(x) if y == 0: y = abs(y) print '%.3f %.3f ' % (x,y)
s710674563
p00004
u282635979
1362319732
Python
Python
py
Runtime Error
0
0
149
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)
s470511508
p00004
u282635979
1362319800
Python
Python
py
Runtime Error
0
0
151
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)
s090205221
p00004
u282635979
1362320070
Python
Python
py
Runtime Error
0
0
163
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)
s309625368
p00004
u282635979
1362320202
Python
Python
py
Runtime Error
0
0
163
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)
s775557315
p00004
u318424563
1366670117
Python
Python
py
Runtime Error
0
0
547
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: y1 = (c - (a*j)) / float(b) y2 = (f - (d*j)) / float(e) if y1 == y2: print "{:.4f} {:.4f}".format(j, y1) break
s353071858
p00004
u318424563
1366670336
Python
Python
py
Runtime Error
0
0
545
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: y1 = (c - (a*j)) / float(b) y2 = (f - (d*j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s740732594
p00004
u318424563
1366670506
Python
Python
py
Runtime Error
0
0
545
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: y1 = (c - (a*j)) / float(b) y2 = (f - (d*j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s442150782
p00004
u318424563
1366670506
Python
Python
py
Runtime Error
0
0
545
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: y1 = (c - (a*j)) / float(b) y2 = (f - (d*j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s725660881
p00004
u318424563
1366670751
Python
Python
py
Runtime Error
0
0
549
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: y1 = (c - (a * j)) / float(b) y2 = (f - (d * j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s278644503
p00004
u318424563
1366670963
Python
Python
py
Runtime Error
0
0
523
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): if j != 0: if (c - (a * j)) / float(b) == (f - (d * j)) / float(e): print "{:.3f} {:.3f}".format(j, (c - (a * j)) / float(b)) break
s378807113
p00004
u318424563
1366671431
Python
Python
py
Runtime Error
0
0
506
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if abs(a) or abs(b) or abs(c) or abs(d) or abs(e) or abs(f) <= 1000: for j in range(-1000, 1001): y1 = (c - (a * j)) / float(b) y2 = (f - (d * j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s382379409
p00004
u318424563
1366672440
Python
Python
py
Runtime Error
0
0
593
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if (abs(a) <= 1000 and abs(b) <= 1000 and abs(c) <= 1000 and abs(d) <= 1000 and abs(e) <= 1000 and abs(f) <= 1000): for j in range(-1000, 1001): y1 = (c - (a * j)) / float(b) y2 = (f - (d * j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s160855200
p00004
u318424563
1366680969
Python
Python
py
Runtime Error
0
0
593
data = [] try: while True: data.append(raw_input()) except EOFError: pass for i in data: a, b, c, d, e, f = i.split() a, b, c, d, e, f = int(a), int(b), int(c), int(d), int(e), int(f) if (abs(a) <= 1000 and abs(b) <= 1000 and abs(c) <= 1000 and abs(d) <= 1000 and abs(e) <= 1000 and abs(f) <= 1000): for j in range(-1000, 1001): y1 = (c - (a * j)) / float(b) y2 = (f - (d * j)) / float(e) if y1 == y2: print "{:.3f} {:.3f}".format(j, y1) break
s136531953
p00004
u350508326
1367942845
Python
Python
py
Runtime Error
0
0
287
e True: try: a = map(long,raw_input().split()) m = a[0]*a[4]-a[1]*a[3] x = (a[4]*a[2] - a[1]*a[5])/m y = (a[0]*a[5] - a[2]*a[3])/m if x == -0: x = 0 if y == -0: y = 0 print "%.3f %.3f" % (x,y) except EOFError: break
s214080166
p00004
u542421762
1368109426
Python
Python
py
Runtime Error
0
0
309
import sys def solv(a,b,c,d,e,f): x = (c * e - b * f) / (a * e - b * d) y = (f - d * x) / e return (x, y) lis = sys.stdin.readlines() for line in lis: a, b, c, d, e, f = tuple(map((lambda x: float(x)), line.split(' '))) (x, y) = solv(a, b, c, d, e, f) print "%5.3f %5.3f" % (x, y)
s755943373
p00004
u542421762
1368109663
Python
Python
py
Runtime Error
0
0
294
import sys def solv(a,b,c,d,e,f): x = (c * e - b * f) / (a * e - b * d) y = (f - d * x) / e return (x, y) lis = sys.stdin.readlines() for line in lis: a, b, c, d, e, f = tuple(map(float, line.split(' '))) (x, y) = solv(a, b, c, d, e, f) print "%5.3f %5.3f" % (x, y)
s863639694
p00004
u912573907
1375167672
Python
Python
py
Runtime Error
0
0
432
import sys def gcd(a, b): return gcd(b, a % b) if a % b else b def lcm(a, b): return a * b / gcd(a, b) for line in sys.stdin: data = map(int, line.split()) a, b, c, d, e, f = data ix = lcm(a, d) / a jx = lcm(a, d) / d iy = lcm(b, e) / b jy = lcm(b, e) / e x = (c*1.0*iy - f*jy) / (a*iy - d*jy) y = (c*1.0*ix - f*jx) / (b*ix - e*jx) print "%.3f %.3f" % (round(x, 4), round(y, 4))
s764105194
p00004
u912573907
1375167705
Python
Python
py
Runtime Error
0
0
417
import sys def gcd(a, b): return gcd(b, a % b) if a % b else b def lcm(a, b): return a * b / gcd(a, b) for line in sys.stdin: data = line.split() a, b, c, d, e, f = data ix = lcm(a, d) / a jx = lcm(a, d) / d iy = lcm(b, e) / b jy = lcm(b, e) / e x = (c*1.0*iy - f*jy) / (a*iy - d*jy) y = (c*1.0*ix - f*jx) / (b*ix - e*jx) print "%.3f %.3f" % (round(x, 4), round(y, 4))
s320826900
p00004
u912573907
1375168000
Python
Python
py
Runtime Error
0
0
431
import sys def gcd(aa, bb): return gcd(bb, aa % bb) if aa % bb else bb def lcm(aa, bb): return aa * bb / gcd(aa, bb) for line in sys.stdin: data = line.split() a, b, c, d, e, f = data ix = lcm(a, d) / a jx = lcm(a, d) / d iy = lcm(b, e) / b jy = lcm(b, e) / e x = (c*1.0*iy - f*jy) / (a*iy - d*jy) y = (c*1.0*ix - f*jx) / (b*ix - e*jx) print "%.3f %.3f" % (round(x, 4), round(y, 4))
s493866624
p00004
u912573907
1375168050
Python
Python
py
Runtime Error
0
0
427
import sys def gcd(a, b): return gcd(b, a % b) if a % b else b def lcm(a, b): return a * b / gcd(a, b) for line in sys.stdin: data = map(int, line.split()) a, b, c, d, e, f = data ix = lcm(a, d) / a jx = lcm(a, d) / d iy = lcm(b, e) / b jy = lcm(b, e) / e x = (c*1.0*iy - f*jy) / (a*iy - d*jy) y = (c*1.0*ix - f*jx) / (b*ix - e*jx) print "%.3f %.3f" % (round(x, 4), round(y, 4))
s125266767
p00004
u547057305
1381682546
Python
Python
py
Runtime Error
0
0
173
while 1: a, b, c, d, e, f = map(int,input().split()) x = (c/b-f/e) / (a/b-d/e) y = (c/a-f/d) / (b/a-e/d) print("{:+.3f} {:+.3f}".format(x,y))
s144980213
p00004
u351182591
1382019576
Python
Python
py
Runtime Error
0
0
257
while 1: P = map(float,raw_input().split()) x = (P[2]*P[4]-P[1]*P[5])/(P[0]*P[4]-P[1]*P[3]) y = (P[2]*P[3]-P[0]*P[5])/(P[1]*P[3]-P[0]*P[4]) x = x if x else 0 y = y if y else 0 print "{:.3f} {:.3f}".format(x,y)
s004681144
p00004
u180192650
1384188025
Python
Python
py
Runtime Error
0
0
204
data = raw_input() while data: a, b, c, d, e, f = map(int, data.split()) det = a*e-b*d x, y = float(e*c+(-b)*f)/det, float((-d)*c+a*f)/det print '%.3f %.3f' % (x, y) data = raw_input()
s303487883
p00004
u786185717
1389521039
Python
Python
py
Runtime Error
0
0
195
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))
s776170609
p00004
u633068244
1393348201
Python
Python
py
Runtime Error
0
0
238
while True: try: a, b, c, d, e, f = map(int, raw_input().split()) x = float(c*e - b*f)/(a*e - b*d) y = float(c*d - a*f)/(b*d - a*e) print ("%f %f" % (round(x,-3), round(y,-3)) except: break
s901379636
p00004
u633068244
1393350003
Python
Python
py
Runtime Error
0
0
253
import sys for i in stdin.sys: a, b, c, d, e, f = map(float, raw_input().split()) x = float(c*e - b*f)/(a*e - b*d) y = float(c*d - a*f)/(b*d - a*e) if x == -0: x = 0 if y == -0: y = 0 print ("%.3f %.3f" % (x, y))
s253842544
p00004
u193025715
1394764693
Python
Python
py
Runtime Error
0
0
151
while 1: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (a - g) y = (c - a * x) / b print str(x) + " " + str(y)
s097642153
p00004
u193025715
1394764725
Python
Python
py
Runtime Error
0
0
165
while 1: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (float(a) - g) y = (c - a * x) / float(b) print str(x) + " " + str(y)
s990231557
p00004
u193025715
1394764823
Python
Python
py
Runtime Error
0
0
228
import sys while 1: try: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (float(a) - g) y = (c - a * x) / float(b) print str(x) + " " + str(y) except: EOFError sys.exit()
s655322490
p00004
u193025715
1394764858
Python
Python
py
Runtime Error
0
0
231
import sys while 1: try: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (float(a) - g) y = (c - a * x) / float(b) print str(x) + " " + str(y) exception: EOFError sys.exit()
s704175339
p00004
u193025715
1394764907
Python
Python
py
Runtime Error
0
0
228
import sys while 1: try: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (float(a) - g) y = (c - a * x) / float(b) print str(x) + " " + str(y) except: EOFError sys.exit()
s747276575
p00004
u193025715
1394764979
Python
Python
py
Runtime Error
0
0
228
import sys while 1: try: a, b, c, d, e, f = map(int, raw_input().split()) g = b / e x = (c - g * f) / (float(a) - g) y = (c - a * x) / float(b) print str(x) + " " + str(y) except EOFError: sys.exit()