Loading...
Loading...
Loading...
A ticket system gives odd ticket numbers to the left queue and even numbers to the right queue. Read a ticket number and print odd or even, deciding with the lowest bit instead of %.
odd or even.Example
Input
7
Output
odd
The lowest bit of 7 is 1.
Try the problem first. Open one hint at a time.
The lowest bit of n is n & 1.
Python gives the right lowest bit for negative numbers too.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor