PEPPERON - Need Help

https://www.codechef.com/COOK109B/problems/PEPPERON
https://www.codechef.com/viewsolution/26198784

I dont know where i am going wrong :frowning: . I have started to get an existential crisis. Please help!

I think a better way to ask for help will be to explain your approach here rather then to just put you code here and expect others to debug it for you.