Chef and number c++

https://www.codechef.com/viewsolution/33349760

Please check the program all the example are giving correct answer if u need help i have commented somethings to understand the program better.
Please check the program