Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdio>
- using namespace std;
- int main(){
- int t; cin >> t;
- for(int i = 1; i <= t; i++){
- int k; cin >> k;
- unsigned long long int a[k];
- for(int j = 0; j < k; j++){
- cin >> a[j];
- }
- unsigned long long int result = 1;
- if(k == 1){
- result = a[0] * a[0];
- }
- else{
- result = a[0] * a[k-1];
- }
- cout << "Case " << i << ": " << result;
- //printf("Case %d: %lld", i, result);
- if(i != t) cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement