You are viewing a single comment's thread. Return to all comments →
A hint, if you will: All solutions that ya'll tryn'na google are incorrect. Bruteforcing using itertools is not going to work at all.
A better hint: try to solve this by intelligently counting derangements and partial derangements.