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.
• First line: Integer q (number of queries)
• Next q lines: Each line contains op a b
• op is one of: ADD, SUB, MUL, DIV
• a and b are integers
• For each query, print the result on a new line
• For DIV, if b == 0, print ERR
• 1 ≤ q ≤ 10^5
• -10^9 ≤ a, b ≤ 10^9
• Integer division should use a // b
Queries:
1.ADD 5 3 → 5 + 3 = 8
2.SUB 10 4 → 10 - 4 = 6
3.MUL 2 6 → 2 × 6 = 12
4.DIV 8 2 → 8 // 2 = 4
If a query was DIV 5 0, output would be ERR.
1.Read integer q.
2.Loop q times:
• Read op, a, b.
• If op is ADD, print a + b.
• If op is SUB, print a - b.
• If op is MUL, print a * b.
• If op is DIV:
• If b == 0, print "ERR".
• Otherwise, print a // b.