Problem Description

You will receive q queries of form: op a b, where op is ADD, SUB, MUL, DIV. For DIV, if b is 0 output ERR else output integer division a//b. Output answer for each query on new line.

Input Format

First line q. Next q lines: op a b.

Output Format

q lines result.

Sample Test Case

Input:
4 ADD 5 2 DIV 7 3 DIV 10 0 MUL -2 4
Output:
7 2 ERR -8

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next