Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- int main() {
- int t, n;
- cin >> t;
- for(int x = 1; x <= t; ++x) {
- cin >> n;
- string field;
- cin >> field;
- int ans = 0;
- for(int i = 0; i < field.size(); ++i) {
- if(field[i] == '.') {
- ans++;
- i += 2;
- }
- }
- printf("Case %d: %d\n", x, ans);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement