#K39187. Determine the Winner
Determine the Winner
Determine the Winner
You are given an integer n and a sequence of n integers. Two players, Alex and Bob, play a game. The rules of the game are extremely simple: if n is odd, then Alex wins the game; if n is even, then Bob wins the game.
In other words, the outcome is completely determined by the parity of n. Mathematically, if we denote the winner as W, then
$$W = \begin{cases} \text{Alex} & \text{if } n \equiv 1 \pmod{2} \\ \text{Bob} & \text{if } n \equiv 0 \pmod{2} \end{cases} $$Your task is to implement a program that reads the input from standard input (stdin) and outputs the winner's name to standard output (stdout).
inputFormat
The input consists of two lines:
- The first line contains a single integer
n
(1 ≤ n ≤ 105), representing the number of elements in the sequence. - The second line contains
n
space-separated integers, representing the elements of the sequence. The values of the integers can be large, possibly up to 109 in absolute value.
outputFormat
Output a single line containing either "Alex" or "Bob" -- the winner of the game based solely on the parity of n
.
5
3 1 4 1 5
Alex
</p>