← 返回 google 的题目列表Maximum Coins Eaten
类型:online_judge
Given an array containing the number of coins, each time you can move three coins, find how many coins can be eaten at most.
Input
An array coins representing the number of coins, where 1 <= coins[i] <= 100.
The length of the array 1 <= len(coins) <= 1000.
Output
An integer representing the maximum number of coins that can be eaten.
Example
Input: [2, 3, 1, 5]
Output: 11
Input: [1, 2, 3, 3, 2]
Output: 11
Example
Input
2 3 1 5