#K41992. Binary String Game Winner
Binary String Game Winner
Binary String Game Winner
Two players, Alex and Casey, are engaged in a strategic game based on a binary string s. The rules are simple: Alex always plays first. The outcome is determined solely by the content of the string.
Let \( n_0 \) denote the number of zeros in the string \( s \). The winning condition is given by:
\( \text{if } n_0 > 0 \text{ then Alex wins; otherwise, Casey wins.} \)
In other words, if there is at least one '0' in the string, Alex has a winning move. If the string is composed entirely of '1's (or is empty), then no move is available for Alex, and Casey wins by default.
inputFormat
The input consists of a single line containing a binary string s (which may be empty), representing the state of the game.
outputFormat
Output a single line with the name of the winner: either Alex
or Casey
.
000111
Alex