#include<bits/stdc++.h>
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(0);cin.tie(0);
ll n;
string a,b;
cin >> n >> a >> b;
ll ans = 0;
for(ll i = 0;i<n;i++) ans += b[i]=='1'&&(i==0||b[i-1]=='0');
cout << ans << "\n";
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
460 KB |
Output is correct |
5 |
Correct |
0 ms |
456 KB |
Output is correct |
6 |
Correct |
0 ms |
348 KB |
Output is correct |
7 |
Correct |
4 ms |
4340 KB |
Output is correct |
8 |
Correct |
4 ms |
4340 KB |
Output is correct |
9 |
Correct |
4 ms |
4344 KB |
Output is correct |
10 |
Correct |
4 ms |
4496 KB |
Output is correct |
11 |
Correct |
4 ms |
4416 KB |
Output is correct |
12 |
Correct |
4 ms |
4340 KB |
Output is correct |
13 |
Correct |
4 ms |
4344 KB |
Output is correct |
14 |
Correct |
4 ms |
4344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |