HackerRank Linear Algebra in python problem solution - TheCScience