Hint for problem


#1

You can’t use direct values in the queue, and neither can you store string in queue. By both ways you will get TLE. Try to think of using the remainder of values with A and storing digits in a separate array