Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long int ll;
- typedef double dl;
- typedef unsigned long long ul;
- int main()
- {
- // #ifndef ONLINE_JUDGE
- // clock_t tStart = clock();
- // freopen("input.txt","r",stdin);
- // freopen("out.txt","w",stdout);
- // #endif
- int t, cnt=0;
- while(cin>>t)
- {
- cnt++;
- int zero_na=0;
- ll ans=1;
- for(int i=1; i<=t; i++)
- {
- int x;
- cin>>x;
- if(x>0){ans=ans*x; zero_na=1;}
- }
- if(zero_na == 0) ans=0;
- cout<<"Case #"<<cnt<<": The maximum product is "<<ans<<"."<<endl;
- cout<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement