
Houston, we have had a problem! Our spaceship accindentally flew into a black hole. Time and space thus all distorrrrrrrt. Believe or not, even the priority of our familiar arithmetic operators are changed!
The priority of arithmetic operators in this black hole is as follows:
| - | the highest |
| * / | middle |
| + | the lowest |
Other rules are the same as integer arithmetics on Earth.
Let us take 7/9-8+5*7*1 for example. What we are familair with on Earth is:
7/9-8+5*7*1
= ((7/9)-8)+((5*7)*1)
= (0-8)+(35)
= 27
However, in this black hole we have:
7/9-8+5*7*1
= (7/(9-8))+((5*7)*1)
= 42
Very strange, right? Even worse, the navigation calculator of our spaceship stops working because of this difference, and thus we cannot find the right path back to Earth now.
Fortunately, some students at NTHU are helping us reprogramming the navigation calculator. They arrrrre our future!!
There are multple lines, each being an arithemetic expression.
Each expression can contain
An expression contains no space characters in between operands, operators, and delimiters.
Each expression ends up with a newline character.
For each expression, please perform the following four lines
Please note that