Whole Minute Dilemma Hackerrank Solution Python