#include <iostream>
#include <string.h>
#define maxn 100
using namespace std;
int main()
{
int T;
cin >> T;
while(T--)
{
char s[maxn];
scanf("%s", s);
int flag = 0, total = 0;
for(int m = 0; m < strlen(s); m++)
{
if(s[m] == 'O')
flag++;
else if(s[m] == 'X')
flag = 0;
total += flag;
}
cout << total;
putchar('\n');
}
return 0;
}
UVa 1585 Score
最新推荐文章于 2022-08-15 18:52:43 发布