Arranging Coins - Leetcode 441 - Python