Little Klee had just learned how to do arithmetic operations. She just does operations without following any rules of mathematical expressions. She wants you to calculate the same way.
The first line of input will contain T(≤100) the number of test cases. Then following each line will contain a string containing digits & operators ( +, -, * ) which stands for addition, subtraction & multiplication.
Note:
Output of each test case will follow the following format:
case #x: y, where x stands for number of test case and y is the answer after the calculation.
Note:
See the sample for better understanding.
Input | Output |
---|---|
4 1+2*3 1-10 2*2+3*4 123123123123+123123123123123123123 | case #1: 9 case #2: 999999998 case #3: 28 case #4: 384389558 |
For case 1:
So the final answer is 9 (as Klee doesn't want you to follow arithmetic operation rules, you just have to calculate as the digits and operators appear) For case 2:
|