Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
329 B
3
Indexable
Never
#include <iostream>
#include <string>

using namespace std;

int main(){
    freopen("TRACNGHIEM.INP","r",stdin);
    freopen("TRACNGHIEM.OUT","w",stdout);
    string s1, s2; cin >> s1 >> s2;
    int cnt = 0;
    for(int i = 0; i < s1.size(); i++){
        if(s1[i] == s2[i]) ++cnt;
    }
    cout << cnt << endl;
    return 0;
}
Leave a Comment