P19590 [HackerEarth] Problem Statement:
普及
题目描述

Problem Statement:
Given a simple arithmetic expression you need to find the result in
least repersentable mixed format.
note:expression contains only addition and substraction.

Input format
first line of input contains the no of test cases T. following T test cases
contains the expression.

Output format
output contains T line in which ith line each contains the result corrosponding to ith
expression.

SAMPLE INPUT
5
1/2+2/3
-4/7+1
2+7/8
1/4-3/4
17/8-3/8

SAMPLE OUTPUT
1_1/6
3/7
2_7/8
-1/2
1_3/4

输入格式

见题面

输出格式

见题面

样例输入
8 1-9 8-7 8/7-9/8 4/5-36/72 0-12/5 1234/6-8 1/6-0 7/8-9/6
样例输出
1109_99/100 9 4_41/56 -6_2/3 -2_2/3 -4_5/8 0 -13/20 5_37/84 -1_554/765