Why getting wa?

https://www.codechef.com/submit/SC_05
https://www.codechef.com/viewsolution/38036112

my logic seems to be correct don’t know where i’m missing

Consider the test input:

1
777777777777777777
1 Like

for this input my ‘a’ should be “17 1’s” and 2 but why it is different

You’ve got a 100% reproducible testcase - get debugging :slight_smile:

3 Likes

Thanks for your help

1 Like