Problem code H1

https://www.codechef.com/problems/H1
could bot figure out how to solve this problem plzz help