Sort the array and buy candies in groups of 3 from the most expensive side. For every 3 candies, the cheapest one becomes free.
// A shop is selling candies at a discount. For every two candies sold, the shop gives a third candy for free. // The customer can choose any candy to take away for free as long as the cost of the ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する