9th question of august long challenge(chef and digits of large)

[CodeChef: Practical coding for everyone] this is my solution but as it is bruteforce,it shows TLE.J.ust wanted to understand the correct approach.
by the way ,here is the link of the question[CodeChef: Practical coding for everyone]

Have you read the Editorial?

https://discuss.codechef.com/problems/CDIGLNUM

1 Like