Actually, guest, though you are right, there is a way to solve this without seperatly finding each and every one of the numbers. We can use counting ;)
no, counting is not the type of counting you learned in preschool, it's premutations, the kind you use for combonations.
We can think of the number as 3 giant spaces:
––––– –––––– ––––––
The number in those amount of spaces is the possible numbers for the input:
5 2 1
––––– –––––– ––––––
Now, all we have to do is multiply them all out:
5 * 2 * 1 = 10 possible numbers
And guest, you are correct. The 10 possible numbers are:
534 634 734 834 934
543 643 743 843 943
:)