Timelimit problem unlock

sir, the last test case is not working . Please see the code ince. https://ide.codingblocks.com/s/88958

see the k costraint it can be upto 10^9 so a loop in k will not work try to make loop independent of k
HInt-> as n is upto 10^5 and k=10^9
so it may possible that u may achieve the largest permutation before k became 0 after this there is no work

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

https://ide.codingblocks.com/s/107224 sir, what else could be changed to remove k from the condition?

i have made changes and commented
check this

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.