https://www.codechef.com/COME2019/problems/SUBNUM

How do i approach this problem??

Hope this helps