Problems > Even or Odd > Editorial

Even or Odd — Solution & Editorial

Back to the Problem

Check N % 2 == 0. Note the magnitude: use a 64-bit type in C/C++/Java. In Python integers are unbounded so int(input()) % 2 just works (Python's % on negatives still returns 0 for even numbers).