Array Mathematics Hackerrank Solution Python Programming