#include<stdio.h>
#include<string.h>
int main()
{
char s[80];
int T;
scanf("%d",&T);
while(T--)
{
scanf("%s",s);
int sum=0,score=0,i;
for(i=0;i<strlen(s);i++)
{
if(s[i]=='O')score++;
else score=0;
sum+=score;
}
printf("%d\n",sum);
}
return 0;
}
UVA 1585
最新推荐文章于 2023-01-15 00:04:50 发布