#include <stdio.h>
#include <string.h>
#define maxn 81
char s[maxn];
int main()
{
//input n
int n=0;
scanf("%d",&n);
//input n times
for(int i=0;i<n;i++)
{
scanf("%s",s);
int len=strlen(s);
//printf("%d",len);
/*
* for(int i=0;i<len;i++)
* printf("%c",s[i]);
*/
//连续出现O的计算
int tempscore=0;//当前连续O数(不算当前这个数)
int totalcount=0;
for(int i=0;i<len;i++)
{
if(s[i]=='O')//连续第一个O
{
tempscore++;
totalcount+=tempscore;
}
if(s[i]=='X')
{
tempscore=0;
}
}
printf("%d\n",totalcount);
}
}
转载请注明原文地址: https://ju.6miu.com/read-500189.html