Mini Max Sum Hackerrank Solution In Python