Help Alice to find the Parity
Practice
3 (8 votes)
Implementation
Basics of bit manipulation
Basic programming
Bit manipulation
Bit manipulation
Problem
91% Success 5521 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code
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:
\(1 \leq L \leq R \leq 10^{18}\)
Submissions
Please login to view your submissions
Similar Problems
Points:10
163 votes
Tags:
Bit manipulationEasyReady
2.Max Game
Points:10
4 votes
Tags:
Basic MathBasic ProgrammingBasics of bit manipulationBit ManipulationBasics of Bit Manipulation
Points:10
9 votes
Tags:
Bit ManipulationBasics of Bit ManipulationBasic Programming
Editorial