0%

Problem 93


Problem 93


Arithmetic expressions

By using each of the digits from the set, $\{1, 2, 3, 4\}$, exactly once, and making use of the four arithmetic operations $(+, -, \times, /)$ and brackets/parentheses, it is possible to form different positive integer targets.

For example,
$$
\begin{aligned}
8 & = (4 \times (1 + 3)) / 2 \\
14 & = 4 \times (3 + 1 / 2) \\
19 & = 4 \times (2 + 3) − 1 \\
36 & = 3 \times 4 \times (2 + 1)
\end{aligned}
$$
Note that concatenations of the digits, like $12 + 34$, are not allowed.

Using the set, $\{1, 2, 3, 4\}$, it is possible to obtain thirty-one different target numbers of which $36$ is the maximum, and each of the numbers $1$ to $28$ can be obtained before encountering the first non-expressible number.

Find the set of four distinct digits, $a<b<c<d$, for which the longest set of consecutive positive integers, $1$ to $n$, can be obtained, giving your answer as a string: $abcd$.


算术表达式

使用集合$\{1, 2, 3, 4\}$中每个数字恰好一次,再加上四则运算$(+, -, \times, /)$和括号,可以表示许多不同的整数。

例如:
$$
\begin{aligned}
8 & = (4 \times (1 + 3)) / 2 \\
14 & = 4 \times (3 + 1 / 2) \\
19 & = 4 \times (2 + 3) − 1 \\
36 & = 3 \times 4 \times (2 + 1)
\end{aligned}
$$
注意不允许把数字连起来使用,比如$12 + 34$。

使用集合$\{1, 2, 3, 4\}$,可以表示出$31$个不同的数,其中最大值是$36$,并且可以连续表示$1$至$28$之间的所有数。

考虑所有四个不同数字$a<b<c<d$构成的集合,求其中可以从$1$开始连续表示最多个正整数的集合,并以字符串$abcd$的形式给出你的答案。