Leetcode 399 Python Optimize Root Insurance