Hackerrank-Sherlock And Cost
How to solve the question https://www.hackerrank.com/challenges/sherlock-and-cost on hackerrank?