SIMCALC - Simple Calculator


Mr. Puede is in a problem, he need your help to write down a calculator program to read the input and output the calculator result.

Input

The input begins with the number of test case T (1<=T<=100). Each test case containing notation expression with maximum length 500 characters. There is only 1 digit number written in the notation expression and there is only 5 operators ( ^ * / + - ) in the notation expression. 

Output

Print exactly one number each test case the result of the notation expression. Use 2 digit decimal number if the output is a fraction number. Only the final result can formed as fraction, negative or > 1 digit number.

Example

Input:
2
9/3+8*2
2^3/4+8 Output: 19
10

hide comments
rubenkresna22: 2020-04-17 07:35:32

AC in one go using Wii remote controller


Added by:wibit
Date:2020-04-12
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:C C++ 4.3.2
Resource:Own Problem