public class Solution { private int GCD(int a, int b) { ? GCD(b, a % b) : a; } private int LCM(int a, int b) { return a * b / GCD(a, b); } public string FractionAddition(string expression) { ]; var FU = true;//默认当前表达式为负 if (first != '-') { FU = false…