My code is printing random numbers randomly

my solution - CodeChef: Practical coding for everyone
please tell what’s wrong with it

My code is printing random numbers randomly

What test input are you using? Are you trying to “Run” without Providing “Custom Input”?

1 Like

the random printing has been solved but my code is getting a tle despite it running in 15ms with test cases and without it, it compiles in 0ms
https://www.codechef.com/viewsolution/49902383

See how long it takes to run with e.g. the following test input:

5
1000000000 16 15
999999999 16 15
999999998 16 15
999999997 16 15
999999996 16 15

and then imagine 10^5 testcases instead of just 5 :slight_smile:

Here’s the solution if you get stuck, but I encourage you to try and solve it yourself :slight_smile:

https://discuss.codechef.com/problems/CHFINVNT

1 Like

thank u for the help and you are right i did’t see the constraints cheers i will write a better soloution :upside_down_face:

1 Like