Hello! Let's solve the exercise:
The lock has a 3-number code, and we have 24 numbers which can be a possible solution. We also know that the numbers aren't allowed to repeat. So, how many ways we can select three numbers for the code?
Let's think:
For the first password, we can choose any of the 24 numbers that are able, right? So for the first, we have 24 possible options.
For the second, we have 24 possible options minus 1 option which is already in use in the first password, so we have 24 -1 = 23 possible options here.
For the third, we also have 24 options, but we have to consider 2 unavailable options (1 in the first and 1 in the second), so we have 24 -2 = 22 options.
To finish it, we just have to multiply the possibilities of each lock:
24 * 23 * 22 = 12144 possible options to a unique code.