We are looking for a six-digit numerical code, about which we know that:

- no digit in it is repeated,
- it contains 0, which is not in the second-to-last position,
- in its notation, there are never two odd or two even digits next to each other,
- adjacent single-digit numbers differ by at least 3,
- the numbers obtained by reading the first and second pairs are both multiples of the number formed by reading the third, i.e., the last pair.

Determine the sought code.

(M. Volfová)

Hint. Focus on what the individual pairs look like, especially the last one.
The last digit cannot be 0 or 5: if it were, then according to the fifth condition, the first and second double-digit numbers would end in either 0 or 5, meaning the digit 0 or 5 would appear more than once in the code, which contradicts the first condition.

With this insight, along with the other conditions from the problem, we will start listing all possible double-digit numbers that could appear at the end of the code. Moreover, to satisfy the fifth and first conditions, it makes sense to consider only those double-digit numbers that have at least two different multiples less than 100. All the valid options are listed in the left column of the following table. The right column then contains all their two-digit multiples that could potentially form the first and second double-digit numbers of the desired code.

| 14 | $28,42,56,70,84,98$ |
| :--- | :--- |
| 16 | $32,48,64,80,96$ |
| 18 | $36,54,72,90$ |
| 27 | 54,81 |
| 29 | 58,87 |

If we eliminate all double-digit numbers that do not satisfy the third or fourth conditions from the problem, only the following remain:

| 14 | 70 |
| :--- | :--- |
| 16 | 96 |
| 18 | $36,72,90$ |
| 27 | 81 |
| 29 | 58 |

From this, it is clear that the last double-digit number must be 18. To satisfy the second condition, one of the remaining double-digit numbers must be 90, and to satisfy the fourth condition, 90 must be the first. For the same reason, 72 cannot be the second double-digit number, leaving only 36. Therefore, the final code can only be 903618, and by checking all the conditions from the problem, we confirm that this is indeed the case.

Note. Besides the initial insight that 0 cannot be the last digit, we can also use the fact that 0 cannot be in the first or third position. (Otherwise, the first or second double-digit number would represent a single-digit number, so according to the fifth condition, the last double-digit number would also have to be a single-digit number, and 0 would have to be on the fifth position, which is impossible.) Therefore, 0 must be either in the second or fourth position. From the third condition, it follows that even digits can only be in even positions and odd digits in odd positions. The following discussion is thus somewhat simplified.