Batch Division With Line Errors

Python Hard 2 views
Back to Questions

Problem Description

First line q. Next q lines have a b. For each line output a//b. If b is 0 or parsing fails, output ERROR for that line.

Input Format

First line q. Next q lines: a b.

Output Format

q lines results.

Sample Test Case

Input:
4 10 2 5 0 x 3 9 3
Output:
5 ERROR ERROR 3

Constraints

q

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next