Practice Maximum Score From Removing Stones
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
You are playing a solitaire game with three piles of stones of sizes a, b, and c respectively. Each turn you choose two different non-empty piles, take one stone from each, and add 1 point to your score. The game stops when there are fewer than two non-empty piles (meaning there are no more available moves). Given three integers a, b, and c, return the maximum score you can get.
Source: Maximum Score From Removing Stones on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
a = 2, b = 4, c = 6
6
# Example 2
a = 4, b = 4, c = 6
7
# Example 3
a = 1, b = 8, c = 8
8
Constraints
Related LeetCode Problems
Practice more problems similar to Maximum Score From Removing Stones.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.