Maximum Score Hackerrank Solutions Python