Problem D
Multiplication Game
Alice and Bob are in their class doing drills on multiplication and division. They quickly get bored and instead decide to play a game they invented.
The game starts with a target integer
Assuming that both players play optimally, who (if any) is going to win?
Input
The first line of input contains
Output
For each case, print the name of the winner (Alice or Bob) assuming optimal play, or tie if there is no winner.
Sample Input 1 | Sample Output 1 |
---|---|
10 10 Alice 20 Bob 30 Alice 40 Bob 50 Alice 60 Bob 70 Alice 80 Bob 90 Alice 100 Bob |
Bob Bob tie tie Alice tie tie tie tie Alice |