You are viewing a single comment's thread. Return to all comments →
I can't see any problem in your code. And your code is working fine, though i haven't run it on eclipse but i have tried it on an online compiler and it gave me the correct output.
yes, thats what the problem is , i m not understanding why is it not accepting the solution.
Anyways, Thanks for the help
Do this. Had same issue and it fixed it.
Looking at the test case found that k is pretty large.