156772025-02-21 17:51:48khunTükörtojás (75 pont)cpp17Wrong answer 0/757ms724 KiB
#include <bits/stdc++.h>
using namespace std;

int main() {
    int n;
    cin >> n;
    string a, b;
    cin >> a >> b;
    int r = 0;
    bool same = 0;
    for (int i = n - 1; i >= 0; i--) {
        if ((a[i] == b[i]) != same) {
            r++;
            same = !same;
        }
    }
    cout << r;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/01ms316 KiB
2Wrong answer0/04ms316 KiB
3Wrong answer0/51ms316 KiB
4Wrong answer0/51ms316 KiB
5Wrong answer0/51ms316 KiB
6Wrong answer0/51ms316 KiB
7Wrong answer0/51ms316 KiB
8Wrong answer0/51ms316 KiB
9Wrong answer0/51ms316 KiB
10Wrong answer0/51ms316 KiB
11Wrong answer0/51ms508 KiB
12Wrong answer0/56ms564 KiB
13Wrong answer0/56ms568 KiB
14Wrong answer0/56ms724 KiB
15Wrong answer0/57ms620 KiB
16Wrong answer0/56ms564 KiB
17Wrong answer0/56ms564 KiB