It is given that the code has 5 digits.
The first and last digits are multiples of 5.
The multiples of 5 are: 5, 10, 15, 20, ....
Since 5 is the only single-digit multiple, it can be in the code.
The fourth digit is one less than the fifth digit.
Thus, the fourth digit has to be 4.
The sum of the second and third digits is equal to the fourth digit and the second digit is 2.
Let the third digit be x.
Thus, 2 + x = 4
x = 4 – 2 = 2
Thus, both the second and third digits are 2.
Hence, the code is 52245.