#include <iostream>
#include <vector>
#include <numeric>
#include <cmath>
#include <set>
#include <array>
#include <algorithm>
using namespace std;
using ll = long long;
int main()
{
cin.tie(0)->sync_with_stdio(0);
int n;
string a, b;
cin >> n >> a >> b;
b.push_back('0');
int res = 0;
for (int i = 1; i <= n; ++i) res += b[i] == '0' && b[i - 1] == '1';
cout << res;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
320 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
0 ms |
316 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
6 ms |
4452 KB |
Output is correct |
8 |
Correct |
6 ms |
4372 KB |
Output is correct |
9 |
Correct |
6 ms |
4368 KB |
Output is correct |
10 |
Correct |
7 ms |
4388 KB |
Output is correct |
11 |
Correct |
6 ms |
4384 KB |
Output is correct |
12 |
Correct |
6 ms |
4328 KB |
Output is correct |
13 |
Correct |
6 ms |
4456 KB |
Output is correct |
14 |
Correct |
6 ms |
4364 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
212 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |