After giving back the results of the last topology exam to his students, Pr. Manifold was worried about complaints.
Since he is aware his students know where his office is located, Prof. Manifold decided to transform his office into a bunker with a 10 digit password (all characters are digits).
But he suspected his students to be very clever (despite having tremendously bad grades).
Knowing that, he's not going to pick a password containing certain sequences, such as his StackExchange ID, university parking spot number, and annual salary.
Your program or function will take as input an array of integers. No single integer will contain duplicate digits, which implies that none of the integers will have more than 10 digits.
Your code will output how many unique 10 digit passwords Prof. Manifold can choose, taking into account that correct passwords
- must contain each digit 0-9 exactly once, and
- must not contain any of the sequences present in the input array.
1243587609are all incorrect passwords, because they each contain at least one of the sequences present in the input array.
0113456789is an incorrect password, because the professor's password must contain each digit exactly once.
0123456789is a correct password, because it doesn't contain any sequence present in the array, and it contains each digit exactly once.
[18062,6042,35876] -> 3622326
This is code-golf, so the shortest answer in bytes wins!