This is the original version of problem ,during the contest I tried to solve it using some combinatorics logic but i can't and for this version of problem we can just iterate over all possible PIN codes because constraints are small, yes i didn't able to get this logic during the contest. I am curious to know the approach to solve this question if PIN size will be of 10 digits.