Can someone explain me this problem?


#1

https://www.codechef.com/problems/H1

solution - https://www.codechef.com/viewsolution/23741458