# DCP-220: Friendly game Back to All Problems

Beginner Math > Basic Math

Raihan and Zitu are playing a game with xor( Exclusive or). In each turn Raihan will give zitu a set of numbers and zitu must answer the XOR of the XOR’s of all subsets. Suppose, Raihan gives zitu a set of numbers consisting of 3 elements, { 3,6,8 } . The subsets of the given set are , {3} , {6}, {8}, {3,6}, {3,8}, {6,8}, {3,6,8} and {}. But All on a sudden, Zitu become very busy with his mobile. So, he can not concentrate. Now he asks for your help to play this game. Do not disappoint him. Exclusive or or Exclusive disjunction is a logical operation that outputs true only when inputs differ (one is true, the other is false). you can find more details in this [link][1]. Input: ------ Input starts with an integer T (1<=100), denoting the number of test cases. Each case contains an integer N (1 ≤ N ≤ 100000) denoting the number of elements of array A. The next line will contain n integers separated by spaces, denoting the elements of the array A. Each of these integers will be in the range of 32 bit signed integer number. Output: ------- For each test case, print a line “Case x: y” where x is replaced by the test case number and y is the required result describe above. Sample Input ------------ 1 1 0 Sample Output ------------- Case 1: 0 [1]: https://en.wikipedia.org/wiki/Exclusive_or

### Problem Limits

 Language Time Limit (seconds) C 1.00 C++ 1.00 C++14 1.00 C# 3.00 Go 3.00 Java 3.00 JavaScript 3.00 Objective-C 3.00 Perl 3.00 PHP 3.00 Python 3.00 Python3 3.00 Ruby 3.00 VB.Net 3.00

# 57/130

Solve/Submission

### Ranking

# User Language Timing
01 MAHRahat Cpp14 0.00s
02 Robbinb1993 Cpp 0.01s
03 Morass Cpp14 0.01s
04 feodorv Cpp14 0.02s
05 Core_i14 Cpp14 0.02s
06 jualahmed Cpp14 0.02s
07 tariqiitju Cpp14 0.02s
08 mjtbasif Cpp14 0.02s
09 1604099_ishtiaq Cpp14 0.02s
10 sazal_dev Cpp14 0.02s
11 ash12 Cpp14 0.02s
12 anowar1112 Cpp14 0.02s
13 seyedssz Cpp14 0.02s
14 haasib Cpp14 0.02s
15 gulzar Cpp14 0.02s
16 rayhan50001 Cpp14 0.02s
17 rana_cse Cpp14 0.02s
18 terminator_c Cpp14 0.02s
19 Dinar Cpp14 0.02s
20 robincse14 Cpp14 0.03s
21 mahmud2690 Cpp14 0.03s
22 abdulmukit Cpp 0.03s
23 pusku Cpp 0.03s
24 sk23 Cpp 0.03s
25 10102020 Cpp 0.03s
26 mamun02inf Cpp 0.03s
27 hasanuzzaman333 CSharp 0.03s
29 nazmulhyder CSharp 0.03s
30 zubayerhossain Cpp 0.05s
32 sherina Cpp 0.06s
33 shawon100 Cpp14 0.06s
34 habib_rahman Cpp14 0.06s
35 Saimum_140128 Cpp14 0.06s
36 RandyWaterhouse Cpp 0.06s
37 somia Cpp 0.06s
38 Ashiq CSharp 0.06s
39 _dipu Cpp14 0.06s
40 zahidsheikh Cpp 0.06s
41 devcoder CSharp 0.08s
42 ashrafulais CSharp 0.08s
43 masba Python 0.16s
Feedback