give string expression represent expression fraction addition subtraction return calculation result string formatthe final result irreducible fraction if final result integer change format fraction denominator 1 so case 2 convert 21 Example 1input expression 1212output 01example 2input expression 121213output 13example 3input expression 1312output 16 ConstraintsThe input string contain 0 9 so outputeach fraction input output format numeratordenominator if input fraction output positive omittedThe input contain valid irreducible fraction numerator denominator fraction range 1 10 if denominator 1 mean fraction actually integer fraction format define abovethe number give fraction range 1 10the numerator denominator final result guarantee valid range 32bit int