next up previous
Next: Output Up: Fractions Previous: Fractions

Input

The input starts with a number n, indicating how many operations are there. The next n lines will have 5 integers, separated by a space (let them be a, b, c, d, and e). a indicates the operation: 1 is addition, 2 is subtraction, 3 is multiplication, and 4 is division.



ACM Programming Contest Account
Mon Feb 5 17:30:22 EST 2001