Fun With Expresions
Easy Accuracy: 24.77% Submissions: 230 Points: 2

Evaluate the expression given from left to right in the order the operators come. The expression consists of 4 basic operators +, /, *, -. But it is not certain that which will come first. Operators can come in any order.

Input:
First line consists of T test cases. The next T lines consists of the expressions in each line. 

Output:
The answer should be the floor value of the expression's result.

Constraints:
1 <= T <= 100
1 <= operand value <= 100
1 <= operators <= 4

Example:
Input:

3
10*20+10
16*5-5/15
4/5-8
Output:
210
5
-8

to report an issue on this page.

Editorial

We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?

Yes

All Submissions

My Submissions:

Login to access your submissions.