## 2. Lock

Mislav has forgotten the four-digit code of the bicycle lock, but he remembers some details. The number is divisible by 15, but not by 6, and the digits decrease from the thousands place to the units place. Determine the code of the lock and write down its first three digits (excluding the units digit).

Result:
## Solution.

Since the four-digit number is divisible by 15, it must be divisible by 5. However, as the number is not divisible by 6, it is not divisible by 2 either, so the units digit must be 5.

The digits decrease from the thousands place to the units place. Therefore, the remaining three digits must be greater than 5, so we choose them from the set $\{6,7,8,9\}$.

Possible codes are:

9875

9865

9765

8765

The number is divisible by 15, so it must also be divisible by 3. This means that the sum of its digits must be divisible by 3.

$9+8+7+5=29$

$9+8+6+5=28$

$9+7+6+5=27$ (divisible by $3!$ )

$8+7+6+5=26$

Of the four possible numbers, only 9765 is divisible by 3, and thus by 15. Therefore, the locker code is the number 9765, and the result of this problem is 976.