#include<stdio.h>
#include<string.h>
char s[100];
int main(){
int n;
scanf("%d",& n);
while (n--)
{
int m = 0, t = 0, i = 0;
scanf("%s", s);
while (i <= strlen(s) - 1)
{
if (s[i] == 'X') m = 0;
else
{
m++;
t += m;
}
i++;
}
printf("%d\n", t);
}
return 0;
}
UVa1585
最新推荐文章于 2021-02-08 09:05:44 发布