public class Solution { public string AddStrings(string num1, string num2) { //判断num1和num2的长度,进行对齐 if (num1.Length < num2.Length) { //将num1前补0 var zerocount = num2.Length - num1.Length; StringBuilder sb = new StringBuilder(); ; i < zerocount; i++) {…