Question: XOR of Sums Coding ( 6 ) UNSOLVED Problem Statement Ravi is playing a game in which he needs to convert an array into an
XOR of Sums
Coding
UNSOLVED
Problem Statement
Ravi is playing a game in which he needs to convert an array into an integer. This task seems to be impossible, but Ravi has analgorithm to carry out this conversion.
Take the sum of oddindexed elements
Take the sum of even indexed elements
Take the XOR of both sums
This is how Ravi converts the array into an integer. Write a program to carry this task out for Ravi,
Input Format
The first line of input contains an integer
Next lines of input contain an integer each, the elements of the array.
Constraints
Output Format
Print a single integer, the answer to the problem.
Evaluation Parameters
Sample Input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
