JMU CS280 SP18 WK04


2018-01-30 21:30 CET

JMU CS280 SP18 WK04


2018-02-03 05:59 CET
The end is near!
Contest is over.
Not yet started.
Contest is starting in -115 days 23:22:37

Time elapsed


Time remaining


Problem A
Odd Man Out

You are hosting a party with $G$ guests and notice that there is an odd number of guests! When planning the party you deliberately invited only couples and gave each couple a unique number $C$ on their invitation. You would like to single out whoever came alone by asking all of the guests for their invitation numbers.


The first line of input gives the number of cases, $N$. $N$ test cases follow. For each test case there will be:

  • One line containing the value $G$ the number of guests.

  • One line containing a space-separated list of $G$ integers. Each integer $C$ indicates the invitation code of a guest.

You may assume that $1 \leq N \leq 50, 0 < C < 2^{31}, 3 \leq G < 1\, 000$.


For each test case, output one line containing “Case #$x$: ” followed by the number $C$ of the guest who is alone.

Sample Input 1 Sample Output 1
1 2147483647 2147483647
3 4 7 4 3
2 10 2 10 5
Case #1: 1
Case #2: 7
Case #3: 5