Array Mathematics Hackerrank Solution For Python