It's not entirely clear what your problem is, since you don't say anything about what errors or problems you're experiencing. However, it's possible you're running into the subject of my complaint above. You can't do from itertools import permutations for now. The test declares its own, less flexible version of permutations that overrides it, and which doesn't accept a second parameter. For now, you can work around it by calling import itertools and then using the fully-qualified itertools.permutations function.
Not an issue
It's not entirely clear what your problem is, since you don't say anything about what errors or problems you're experiencing. However, it's possible you're running into the subject of my complaint above. You can't do
from itertools import permutations
for now. The test declares its own, less flexible version of permutations that overrides it, and which doesn't accept a second parameter. For now, you can work around it by callingimport itertools
and then using the fully-qualifieditertools.permutations
function.It's up to 9 digits, so your code is too slow to pass the final testcases;-)...
OK, thanks for your feedback ;-)
Can you make a concrete example? As I don't see any chance of getting two different numbers as viable solutions, but I might be short-sighted.