Sort 16 Discussions, By:
Please Login in order to post a comment
for test case 1 , use unsigned long long int instead of long long int to store the number in base k...because 10^6 in binary will have around 20 digits and long long int causes overflow.
whats the problem with test case no 1.. i m not able to pass it.. what should i do.??
hope this may useful ( for 1<=k<=9 )
Find my java solution here
you can find my java solution here