Leetcode Simple Python Program Using Loops With Arrays For 24