Advertisement
Saleh127

Lo 1389

Aug 12th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.  
  6. int t,l,i,j,k;
  7. string a;
  8. cin>>t;
  9. for(l=1;l<=t;l++)
  10. {
  11. cin>>j>>a;
  12. k=0;
  13. for(i=0;i<j;i++)
  14. {
  15. if(a[i]=='.')
  16. {
  17. k++;
  18. i+=2;
  19. }
  20. }
  21. cout<<"Case "<<l<<": "<<k<<endl;
  22. }
  23.  
  24.  
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement