17782022-12-02 22:47:11kdbTükörtojás (75 pont)cpp11Accepted 75/753ms4436 KiB
#include <iostream>
using namespace std;
int main()
{
    cin.tie(nullptr);
    cout.tie(nullptr);
    ios_base::sync_with_stdio(false);
    int n, m = 0;
    string a, b;
    cin >> n >> a >> b;
    for (size_t i = 0; i < n; i++)
    {
        if ((a[i] != b[i]) != ( b[i + 1] != a[i + 1])) m++;
    }
    cout << m << endl;
    return 0;
}
/*s
5
SFSSF
FSFSS
-3
*/
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1824 KiB
2Accepted0/03ms2452 KiB
3Accepted5/52ms2156 KiB
4Accepted5/52ms2300 KiB
5Accepted5/52ms2428 KiB
6Accepted5/52ms2632 KiB
7Accepted5/52ms2704 KiB
8Accepted5/52ms2836 KiB
9Accepted5/52ms2916 KiB
10Accepted5/52ms2948 KiB
11Accepted5/52ms3024 KiB
12Accepted5/53ms3568 KiB
13Accepted5/53ms3824 KiB
14Accepted5/53ms4028 KiB
15Accepted5/53ms3980 KiB
16Accepted5/53ms4240 KiB
17Accepted5/53ms4436 KiB