LearnPy Hub
← Arena
AdvancedRating 1500

Largest Product Stretch

Print the largest product of a non-empty contiguous subarray.

Input

n, then n integers.

Output

A number.

Sample 1

Input
4
2 3 -2 4
Output
6

Sample 2

Input
3
-2 0 -1
Output
0
solution.py
Output appears here
Largest Product Stretch · Python Arena problem · LearnPy Hub