#C1340. The Alternating Guessing Game
The Alternating Guessing Game
The Alternating Guessing Game
In this problem, you are given a single integer \(N\) which represents the upper bound of a guessing game. Two players, Alice and Bob, take turns to guess numbers starting from 1. Alice starts with the first guess, then Bob takes his turn, and they continue alternately until the guess reaches \(N\).
If \(N\) is less than 1, the input is considered invalid and you should output Invalid number
. For valid \(N\), if the final guess is made on an odd count (i.e., \(N\) is odd), then Alice wins; if even, Bob wins.
Your task is to implement a program that reads \(N\) from the standard input and prints the winner of the game on the standard output.
inputFormat
The input consists of a single line containing an integer \(N\) which represents the maximum number in the guessing game. The integer may be negative or zero, in which case it is considered invalid.
outputFormat
Output a single line indicating the result of the game. Print Alice
if Alice wins, Bob
if Bob wins, or Invalid number
if \(N < 1\).
1
Alice
</p>