A counting Problem (codechef starters 11)

Hi everyone,
Can anyone explain me the solution of the recent contest problemA counting Problem As the official solution is not posted yet.
It would be very helpful to me if you could explain.
Thanks :smiley:

1 Like