Sherlock and Cost | HackerRank