Help Alice to find the Parity

3

8 votes
Implementation, Basics of Bit Manipulation, Basic Programming, Bit Manipulation, Bit manipulation
Problem

Alice has 2 integers L and R. Let X be the number we get by xoring all numbers in the range [L,R] (including L and R). He recently learnt about even and odd numbers and wonders what will be the parity on X.

Input Format:

First line contains 2 integers L and R 

Output Format:

Print "even" if the number X is even else print "odd" without the quotes. 

Constraints:

1LR1018

Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Here L is 3 and R is 5

Now X=(3^4^5) where '^' represents bitwise xor.

X=2.

Since X is even, the output is "even".

 

 

 

Editor Image

?