시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB107755871.605%

문제

While doing your math homework, you decide that it might be easier for your computer to do the work instead of having to do them yourself with a calculator. Write a program that will calculate the answer to an equation.

입력

The first line will contain a single integer n that indicates the number of data sets that follow. Each data set will consist of a single line containing alternating integers and operators. There will be a space between each number and operator, and the only operators will be + - * / %.

출력

Output the integer value solution to the equation. The final answer will always be an integer, and all intermediate steps will be integers. The equation will be solved using the standard mathematical precedence rules.

예제 입력 1

3
5 * 2 + 9 / 3
2 + 2 + 6 % 5
6 + 2 * 10 - 4

예제 출력 1

13
5
22