Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
My code finds the answer in:
177 ns ± 2.46 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each),
but time outs on the server.
next_smaller(11911)
->11191
Hello World.
How do I see hidden input values?
My code executes in 200ns localy on a large number like (123456789123456789123456789123456789123456789), but it time outs on the server and idk why.
%timeit next_smaller(9525144338352127488)
9525144338352124887
184 ns ± 0.33 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each)
Execution Timed Out (12000 ms) O_O
Thx.
My solution looks ugly but it's 2.5 times faster than the one at the top of Best Practices :)
Why tests say "True should equal False"?
Welp, for me tests say 7 should equal 3. :| Python
This comment is hidden because it contains spoiler information about the solution
It failed no matter what. Renamed _if to iif -> all tests passed. O_O Wait, what? #Python