Odd/Even Strings
Time limit1sMemory limit1024 MB
- Level
Not classified yet
- Solved
- No attempts yet
Problem
Consider a string containing lowercase letters only. A string is odd if every letter in it appears an odd number of times. A string is even if every letter in it appears an even number of times.
Given a string, determine whether it is odd or even.
Input
There is one input line. It contains a string of lowercase letters only. The string has between 1 and 60 letters, inclusive.
Output
Print 0 if the string is even, 1 if the string is odd, and 0/1 if it is neither.