32342023-02-23 10:12:04xxxTükörtojás (75 pont)cpp14Wrong answer 0/754ms4500 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++;
			g = !g;
		}
		else if (!g && rossz[i] == jo[i]){
			ans++;
			g = !g;
		}
	}
	
	cout << ans << endl;
  return 0;

}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1816 KiB
2Runtime error0/04ms2388 KiB
3Wrong answer0/53ms2088 KiB
4Wrong answer0/53ms2112 KiB
5Wrong answer0/53ms2336 KiB
6Wrong answer0/52ms2400 KiB
7Wrong answer0/53ms2524 KiB
8Wrong answer0/53ms2740 KiB
9Wrong answer0/53ms2828 KiB
10Wrong answer0/53ms2952 KiB
11Wrong answer0/53ms3168 KiB
12Runtime error0/54ms3972 KiB
13Runtime error0/54ms4096 KiB
14Runtime error0/54ms4312 KiB
15Runtime error0/54ms4396 KiB
16Runtime error0/54ms4444 KiB
17Runtime error0/54ms4500 KiB