Why this code not getting AC? Not able to catch the corner case if any?

https://www.codechef.com/PAHC2020/problems/BINCOIN