Hackerrank: Mark and toys - https://www.hackerrank.com/challenges/mark-and-toys