Help with Hackerearth Problem
I came across this problem on HackerEarth and I don't know how to go about the solution. Can anyone help?