https://www.codechef.com/viewsolution/8557284
It is an easy question. Problem Link – GROWGOLD Problem - CodeChef