#C10581. Determine the Parity of a Binary String
Determine the Parity of a Binary String
Determine the Parity of a Binary String
You are given an integer n and a binary string of length n consisting only of characters '0' and '1'. Your task is to determine whether the total number of '1's in the string is even or odd.
If the count is even, output EVEN; otherwise, output ODD.
This problem tests your ability to process strings and count characters efficiently. Consider edge cases such as a string with a single character.
The mathematical formulation is simple: Let \(S\) be the binary string and \(c(1)\) be the count of '1's in \(S\). You need to determine if \(c(1) \bmod 2 = 0\) (even) or \(c(1) \bmod 2 = 1\) (odd).
inputFormat
The input is given via stdin in the following format:
- The first line contains an integer n \( (1 \leq n \leq 10^5) \) representing the length of the binary string.
- The second line contains a binary string of length n consisting solely of the characters '0' and '1'.
outputFormat
Output a single line to stdout containing either EVEN if the number of '1's in the binary string is even, or ODD if the number is odd.
## sample5
01010
EVEN
</p>