//Java import java.util.Scanner; class uva11059{ public static void main(String args[]){ Scanner sc=new Scanner(System.in); int count=0; while(sc.hasNextInt()){ count++; int n=sc.nextInt(); int arr[]=new int[n]; for(int i=0;i<n;i++) arr[i]=sc.nextInt(); //找出最大值。 long max=0; for(int i=0;i<n;i++){ long temp=1; for(int j=i;j<n;j++){ temp=temp*arr[j]; if(max<temp) max=temp; } } //Output System.out.println("Case #"+count+": The maximum product is "+max+"."); System.out.println(""); } } }