よじろめ覚書

私の理解度重視のソースコードです。

ABC139A - Tenki

問題:A - Tenki

#include <iostream>
#include <string>
using namespace std;

#define REP(i, n) for (int i = 0; i < (n); ++i)

int main(void) {
    int ans = 0;
    string s, t;

    cin.tie(0);
    ios::sync_with_stdio(false);
    cin >> s;
    cin >> t;
    REP(i, s.length()) {
        if (s[i] == t[i]) {
            ans++;
        }
    }

    cout << ans << "\n";
    return 0;
}