I have same problem.
"Checkmate (often shortened to mate) is any game position in chess and other chess-like games in which a player's king is in check (threatened with capture) and there is no possible escape."
Where's the catch?
I can only speak for myself, but I had originally used itertools.permutation() to split the given number into an array of all of its permutations and then sort through to find the lowest number greater than the original. This worked for the test cases but not when I actually attempted since really large numbers timeout as this algorithm is super inefficient.
So I changed the whole gameplan and simply forgot to change the 'import itertools' line at the top.
They may trying to use the function(s) in the module itertools but the failed or find out that they don't need it.
And that's why they leave the code 'import itertools' undeleted.
But I am a dumbass so I will use itertools.permutations to solve it.
got fixed above
A very strange understanding of the concept of immutable.
I have same problem.
"Checkmate (often shortened to mate) is any game position in chess and other chess-like games in which a player's king is in check (threatened with capture) and there is no possible escape."
Where's the catch?
Very slowly =/
Same idea with me!
Lists are not hashable but tuples are. But genuinely quite a clever idea using a dictionary, saves all of the conditional expressions :)
[...'abc'] in this case is similar to 'abc'.split('')
nice
I can only speak for myself, but I had originally used itertools.permutation() to split the given number into an array of all of its permutations and then sort through to find the lowest number greater than the original. This worked for the test cases but not when I actually attempted since really large numbers timeout as this algorithm is super inefficient.
So I changed the whole gameplan and simply forgot to change the 'import itertools' line at the top.
This comment is hidden because it contains spoiler information about the solution
pain
Someone forget remove unused import, other copy-paste
Thanks for showing me how much of a dumbass I actually am.
They may trying to use the function(s) in the module itertools but the failed or find out that they don't need it.
And that's why they leave the code 'import itertools' undeleted.
But I am a dumbass so I will use itertools.permutations to solve it.
This comment is hidden because it contains spoiler information about the solution
Loading more items...