#include<iostream>
#include<vector>
using namespace std;
int main()
{
int n,k,num=0;
long long tmp, max;
vector<int> v;
while (cin >> n) {
num += 1;
max = 0;
for (int i = 0; i < n; i++) {
cin >> k;
v.push_back(k);
}
for (int i = 0; i < n; i++) {
tmp = 1;
for (int j = i; j < n; j++) {
tmp *= (long long)v[j];
if (tmp > max) {
max = tmp;
}
}
}
cout << "Case #"<<num<<": The maximum product is " << max << endl;
}
}
Uva11059
最新推荐文章于 2024-08-19 07:15:00 发布