https://editor.csdn.net/md?not_checkout=1&spm=1015.2103.3001.8066&articleId=138048516
class Solution {
public:
string solve(string s, string t) {
// write code here
string ret;
int tmp = 0; // 进位 + 本次累加和
int i = s.size()-1, j = t.size()-1;
while (i >= 0 || j >= 0 || tmp) {
if (i >= 0) tmp += s[i--] - '0';
if (j >= 0) tmp += t[j--] - '0';
ret += '0' + tmp % 10;
tmp /= 10;
}
reverse(ret.begin(), ret.end());
return ret;
}
};