Problem Link-https://www.codechef.com/ZCOPRAC/problems/ZCO14004
Please explain your approach with code