hackerrank Minimum Draws Solution