32372023-02-23 10:26:52xxxTükörtojás (75 pont)cpp14Accepted 75/758ms4100 KiB
 #include <bits/stdc++.h>
using namespace std;
int main() {
 	
	int n;
	cin >> n;
	string jo, rossz;
	cin.ignore();
	getline(cin, rossz);
	getline(cin, jo);
	bool g = true;
	int ans = 0;
	
	for (int i = n-1; i >= 0; i--) {
		if (g && rossz[i] != jo[i]){
			ans++;
			g = !g;
		}
		else if (!g && rossz[i] == jo[i]){
			ans++;
			g = !g;
		}
	}
	
	cout << ans << endl;
  return 0;

}
SubtaskSumTestVerdictTimeMemory
base75/75
1Accepted0/03ms1816 KiB
2Accepted0/04ms2248 KiB
3Accepted5/53ms2108 KiB
4Accepted5/53ms2188 KiB
5Accepted5/53ms2316 KiB
6Accepted5/53ms2524 KiB
7Accepted5/53ms2744 KiB
8Accepted5/53ms2952 KiB
9Accepted5/53ms3068 KiB
10Accepted5/53ms3032 KiB
11Accepted5/53ms3168 KiB
12Accepted5/58ms3888 KiB
13Accepted5/57ms4100 KiB
14Accepted5/57ms4056 KiB
15Accepted5/57ms4056 KiB
16Accepted5/57ms4056 KiB
17Accepted5/57ms4056 KiB