Time limit
1s
Memory limit
128 MB
A teacher wrote arithmetic expressions whose value is 2,000. During printing, every operator disappeared, leaving only one concatenated digit string.
Insert one or more binary operators between digits so that the expression evaluates to 2,000 under the usual precedence rules. The only operators that may be used are +, -, and *.
Each expression must follow these rules.
0. The value zero must be written as the single digit 0.+ or unary - before a number is not allowed.* is evaluated before + and -; operators with the same precedence are evaluated from left to right.Write a program that prints every valid expression that can be made from the given digit string and has value 2,000.
The first line contains the digit string with no spaces. Its length is at most 9.
Print one expression per line whose value is 2,000. If there are multiple expressions, print them in lexicographic order as strings.