알고리즘/SW Expert Academy
[D3] 9317. 석찬이의 받아쓰기
혬혬
2020. 3. 8. 20:01
728x90
#include<stdio.h>
#include<iostream>
using namespace std;
int main(void) {
int tc = 0;
cin >> tc;
for (int i = 0; i < tc; i++) {
string a;
string b;
int s_l = 0;
cin >> s_l;
cin >> a;
cin >> b;
int count = 0;
for (int j = 0; j < s_l; j++) {
if (a[j] == b[j])
count++;
}
cout <<"#"<<i+1<<" "<< count<<endl;
}
return 0;
}
728x90