This is a cross post of @life-hacker/leetcode-challenge-python3-problem-3 by @life-hacker.LeetCode Challenge (Python3). Problem#3