3 人解决,8 人已尝试。
3 份提交通过,共有 14 份提交。
8.9 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
Recently Dr. Imo is doing some research on integral numbers. Studies of splitting numbers is especially all the zeal for him. Now, he wants you to solve one problem and to sympathize with him that they are interesting.
The problem is what is the minimum number that meets the following requirements.
If you are given N = 10, the answer is not 0212 (this contains leading zeroes, so it does not meet the above requirements), but 1202 ((12 × 02)-(12 + 02) = 10) is correct.
The input is a sequence of lines each of which contains one integer N. This satisfies the following conditions.
0 < N < 1, 000, 000, 000
The end of the input is indicated by a line containing a zero.
The output should be comprised of lines each of which contains a single integer, that is the minimum number which meets all the requirements.
The output must be written to standard output.
1 10 1000 0
23 1202 1292
3 人解决,8 人已尝试。
3 份提交通过,共有 14 份提交。
8.9 EMB 奖励。