public class Solution {
public string ComplexNumberMultiply(string a, string b) {
var aryA = a.Split('+');
var aryB = b.Split('+'); var shiA = Convert.ToInt32(aryA[]);
var xuA = Convert.ToInt32(aryA[].Substring(, aryA[].Length - )); var shiB = Convert.ToInt32(aryB[]);
var xuB = Convert.ToInt32(aryB[].Substring(, aryB[].Length - )); var shi1 = shiA * shiB;
var shi2 = xuA * xuB * (-);
var shi = shi1 + shi2; var xu1 = shiA * xuB;
var xu2 = xuA * shiB;
var xu = xu1 + xu2; var result = shi + "+" + xu + "i"; return result;
}
}
https://leetcode.com/problems/complex-number-multiplication/#/description