Tap here to switch tabs
Problem
Submissions

Problem: Find the Winning Player in Coin Game

med
30 min
Try to solve the Find the Winning Player in Coin Game problem.

Statement

You are given two positive integers x and y, representing the number of coins of value 7575 and 1010, respectively.

Alice and Bob play a game where Alice takes the first turn. In each turn, a player must pick a combination of coins that sums to a value of 115115. This requires choosing 11 coin of value 7575 and 44 coins of value 1010.

The player who cannot make a valid move on their turn loses the game.

Assuming both players play optimally, return the name of the winning player, either "Alice" or "Bob".

Constraints:

  • 1≤1 \leq x, y ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Find the Winning Player in Coin Game

med
30 min
Try to solve the Find the Winning Player in Coin Game problem.

Statement

You are given two positive integers x and y, representing the number of coins of value 7575 and 1010, respectively.

Alice and Bob play a game where Alice takes the first turn. In each turn, a player must pick a combination of coins that sums to a value of 115115. This requires choosing 11 coin of value 7575 and 44 coins of value 1010.

The player who cannot make a valid move on their turn loses the game.

Assuming both players play optimally, return the name of the winning player, either "Alice" or "Bob".

Constraints:

  • 1≤1 \leq x, y ≤100\leq 100