Skip to content

Practice Find the Winning Player in Coin Game

Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.

Easy#3222
LeetCode Problem

Find the Winning Player in Coin Game

Problem Statement

You are given two positive integers x and y, denoting the number of coins with values 75 and 10 respectively. Alice and Bob are playing a game. Each turn, starting with Alice, the player must pick up coins with a total value 115. If the player is unable to do so, they lose the game. Return the name of the player who wins the game if both players play optimally.

Source: Find the Winning Player in Coin Game on LeetCode. Use the original task for its coding environment and submissions.

Examples

# Example 1

Input
x = 2, y = 7
Output
"Alice"

# Example 2

Input
x = 4, y = 11
Output
"Bob"

Constraints

1 <= x, y <= 100

Related LeetCode Problems

Practice more problems similar to Find the Winning Player in Coin Game.

Review your practice with PhantomCodeAI

After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.