3 ms·
For the interested: enforcing no palindromes and unique digits reduces the number of possible PINs by about a factor of 2, bringing it down to 5040 4-digit comb
by etcet 15y ago
For the interested: enforcing no palindromes and unique digits reduces the number of possible PINs by about a factor of 2, bringing it down to 5040 4-digit combinations.
[JS code] http://pastebin.com/3A46BP1C http://pastebin.com/3A46BP1C
- Jabbles 15y agoIf the digits are unique then there are no palindromes. Therefore there are 1098*7 = 5040 combinations.
- etcet 15y agoThe formatting ate your *'s but I understand. That's definitely the better way to reason the problem. In my defense it was late (after a trip to the bar) and my code is basically stream of consciousness.