using namespace std; typedef unsigned long long ll; int main() { string str1 = ""; string str2 = ""; getline(cin, str1); getline(cin, str2); int ans = 0; for (int i = 0; i < str1.size(); i++) { if (str1[i] != str2[i]) { if (ans < 10) { break; } else { ans -= 10; } } else { ans = ans + 20; } } cout << ans << endl; return 0; }
点赞 9

相关推荐

投递美团等公司10个岗位
点赞 评论 收藏
转发

牛客热帖

牛客网
牛客企业服务