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.
M, changed to a single while loop just in case, though these while loops had O(sqrt(n)). After several attemts and combining factorials list with math function I got easy random tests and passed lol
Yeah, but I have tried to create a list of factorials from 0 to 1250, this should be enough for n and k ranges I see in logs. However, I get run out of time when find factorials with built-in math module function (and, what is more strange, I get is still, with getting factorials for o(1))
I have some improvement in my mind, might help :)
This comment is hidden because it contains spoiler information about the solution
In the task it is said k <= 100, but it can be up to 1000. Not clear :(