📜 ⬆️ ⬇️

Problem number 93

Using each digit from the set {1, 2, 3, 4} only once, arithmetic operations (+ ,, *, /) and parentheses, it is possible to get different integers.

For example,

8 = (4 * (1 + 3)) / 2
14 = 4 * (3 + 1/2)
19 = 4 * (2 + 3) 1
36 = 3 * 4 * (2 + 1)
')
Note that the union of numbers, such as 12 + 34, is not allowed.

Using the set of numbers {1, 2, 3, 4}, it is possible to obtain a set of positive integers from thirty-one elements, in which the maximum is 36, and which contains all numbers from 1 to 28.

Find a set of four different digits, such that a <b <c <d, and which contain the maximum interval of all numbers from 1 to n.

PS The previous task was too simple and boring, this task seemed to me more interesting, and I hope it will not repeat its fate.

Source: https://habr.com/ru/post/38616/


All Articles