LearnPy Hub
← NumPy problems
Hard

Solve Linear Equations

Read n, then n equations, each as n coefficients followed by the right-hand side. Solve the system with np.linalg.solve and print each unknown rounded to 2 decimals (print 0.00 rather than -0.00). If the system has no single solution (LinAlgError), print no unique solution.

Input

n, then n lines.

Output

n lines or one line.

Sample 1

Input
2
1 1 10
1 -1 2
Output
6.00
4.00

Sample 2

Input
3
2 1 -1 8
-3 -1 2 -11
-2 1 2 -3
Output
2.00
3.00
-1.00
solution.py
Output appears here
Solve Linear Equations · Python practice problem · LearnPy Hub