32332023-02-23 10:09:17xxxTükörtojás (75 pont)cpp14Runtime error 0/754ms4884 KiB
#include <bits/stdc++.h>
using namespace std;
int main() {
 	
	int n;
	cin >> n;
	string jo, rossz;
	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++;
		}
		else if (!g && rossz[i] == jo[i]){
			ans++;
		}
		g = !g;
	}
	
	cout << ans << endl;
  return 0;

}
SubtaskSumTestVerdictTimeMemory
base0/75
1Accepted0/03ms2084 KiB
2Runtime error0/04ms2396 KiB
3Wrong answer0/53ms2276 KiB
4Wrong answer0/53ms2480 KiB
5Wrong answer0/53ms2696 KiB
6Wrong answer0/53ms2912 KiB
7Wrong answer0/53ms3120 KiB
8Wrong answer0/53ms3340 KiB
9Wrong answer0/53ms3544 KiB
10Wrong answer0/53ms3632 KiB
11Wrong answer0/53ms3632 KiB
12Runtime error0/54ms4072 KiB
13Runtime error0/54ms4264 KiB
14Runtime error0/54ms4512 KiB
15Runtime error0/54ms4728 KiB
16Runtime error0/54ms4628 KiB
17Runtime error0/54ms4884 KiB