Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- //using namespace std;
- int main()
- {
- int t,n,total;
- char a[101];
- while( scanf("%d",&t)==1)
- {
- for(int i=1; i<=t; i++)
- {
- scanf("%d %s",&n,a);
- total=0;
- for(int j=0; j<n; )
- {
- if(a[j]=='#')
- j++;
- else
- {
- total++;
- j+=3;
- }
- }
- printf("Case %d: %d\n",i,total);
- }
- break;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement