【2021寒假集训营第一场】F-对答案一时爽
对答案一时爽
https://ac.nowcoder.com/acm/contest/9981/F
#include <bits/stdc++.h> using namespace std; int n; char a[110], b[110]; int main() { scanf("%d", &n); for (int i = 1; i <= n; i++) scanf(" %c", &a[i]); for (int i = 1; i <= n; i++) scanf(" %c", &b[i]); int ans = 0; for (int i = 1; i <= n; i++) { if(a[i] == b[i]) ans+=2; else ans+=1; } printf("%d %d", ans, 0); return 0; }