Home > categories > Security & Protection > Safes > An administrator forgot the code number of his small safe
Question:

An administrator forgot the code number of his small safe

A administrator forgot his password number for a small safe, but only remembered that it was made up of four non - 0 digits, and the sum of the four digits was 9. to ensure that the safe was opened

Answer:

From the title: four numbers between 1 and 9And because the sum of the four digits is 9So the three numbers, 7, 8, and 9, can't be between 1 and sixFour spaces, each space has 6 choices (not necessarily a non repeating one), so try 6X6X6X6=1296 times
Using exhaustive method, four non zero and 9 of a total of 6 groups, 6111, 5112, 4113, 4122, 3222, 3321. Then ask each group how many four digits it can form.6111 and 3222 can each make up 4 4 digits, a total of 8.The remaining 4 groups, each consisting of 12 4 digits, total 48.All 6 groups can make up 56 four digits, so at least 56 tries to open the safe
Because there are four nonzero natural arrays, and the sum of the four digits is 9C (8,3), =8*7*6/ (1*2*3), =56 (x)So try at least 56 times to make sure the safe is opened

Share to: