AdvancedRating 1500
Determinant
Print the determinant of an n×n integer matrix (n ≤ 6) using fractions for exact arithmetic.
Input
n, then n lines.
Output
An integer.
Sample 1
Input
2 1 2 3 4
Output
-2
Sample 2
Input
1 7
Output
7
Output appears heren, then n lines.
An integer.
2 1 2 3 4
-2
1 7
7
Output appears here