You are on page 1of 1

Given an integer array arr, find the contiguous subarray within an array

(containing at least one number) which has the largest product.

Input Format
Take input N. Next line N contains elements of array, denoting the elements of
array.

Constraints
It is assured that the product does not exceed 10^16.

Output Format
print largest product.

Sample Input
15
1
2
2
1
2
3
4
5
6
1
2
3
4
5
7
Sample Output
2419200

You might also like