## This problem is similar to the problem “MNDIGSUM”. The only differences are in the constraints and in the input format. In this problem the range for the base BB is [2,R][2,R], the value of nn can be upto 10121012 and the total number of queries is at most 300300. The differences are described in bold. 100% correct solution

Minimum Digit Sum 2 solution codechef This problem is similar to the problem “MNDIGSUM”. The only differences are in the constraints and in the input format. In this problem the range for the base BB is [2,R][2,R], the value of nn can be upto 10121012 and the total number of queries is at most 300300. The differences are described … Read more