Task 1:
3^x * 5^y.Input: lo = 1, hi = 80
Output: 9
Explanation: The valid numbers are 1, 3, 5, 9, 15, 25, 27, 45, 75; 81 exceeds the upper bound, so this example produces 9 valid values.
Task 2:
def count_decreasing_subarrays(arr: list[int]) -> int:
The function returns the count as an integer.
Input: arr = [8, 7, 6, 4, 3, 10]
Output: 4
Explanation: The run [8, 7, 6] supplies three qualifying subarrays, and [4, 3] adds one more.
Input: arr = [5, 4, 3, 2]
Output: 6
Explanation: All subarrays of length two or greater from this four-element decreasing-by-one run qualify: 4 * 3 / 2 = 6.