Upper limit of M


What is the upper limit of M?
When I gave the test case N=10, M=1000000000 in the expected o/p the last number I got was a 5 digit number. Shouldn’t it go till 9 digits?


I think that is just front end issue of InterviewBit, that they chose to display only limited length of output. not related to problem.