Leetcode Subarray Products Hackerrank Python Practice