Advertisement
juanjo12x

UVA_11875_Brick_Game

Aug 6th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.32 KB | None | 0 0
  1. #include <cstdio>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int TC, count = 0;
  6.  
  7.     scanf("%d", &TC);
  8.     while (TC--) {
  9.         count++;
  10.         int n, ans, m;
  11.         scanf("%d", &n);
  12.  
  13.         for (int i = 0; i < n; i++) {
  14.             scanf("%d", &m);
  15.             if (i == n / 2)
  16.                 ans = m;
  17.         }
  18.  
  19.         printf("Case %d: %d\n", count, ans);
  20.     }
  21.  
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement