// 利用string的erase删除',',只保留纯数字,然后再利用stoi函数将字符串转为数字,直接进行相加
#include "iostream"
#include "string"
using namespace std;
int main(){
string str1, str2;
while(cin >> str1 >> str2){
while(1){
int pos1 = str1.find(','), pos2 = str2.find(',');
if(pos1 == string::npos && pos2 == string::npos) break;
if(pos1 != string::npos) str1.erase(pos1, 1);
if(pos2 != string::npos) str2.erase(pos2, 1);
}
cout << stoi(str1)+stoi(str2) << endl;
}
return 0;
}

京公网安备 11010502036488号