Marc's Cakewalk, is a HackerRank problem from Greedy subdomain. In this post we will see how we can solve this challenge in Python

Problem Description

Marc loves cupcakes, but he also likes to stay fit. Each cupcake has a calorie count, and Marc can walk a distance to expend those calories. If Marc has eaten cupcakes so far, after eating a cupcake ....

You can find the full details of the problem Marc's Cakewalk at HackerRank

Solution: Please check the snippet for the solution.

Solution originally posted at: Github by @marinskiy