//#include <iostream>
//#include <iomanip>
#include <cstdio>
#include <cstring>
//using namespace std;
int main() {
//ios::sync_with_stdio(false);
//FILE *f = fopen("in.txt", "r");
char c[85];
int n, i;
scanf("%d", &n);
int result = 0;
int count = 0;
for(; n > 0; n--) {
scanf("%s", c);
for(i = 0; i < strlen(c); i++) {
if(c[i] == 'O') {
result += ++count;
} else {
count = 0;
}
}
printf("%d\n", result);
result = 0;
count = 0;
}
//fclose(f);
return 0;
}
UVa 1585 Score
最新推荐文章于 2022-08-15 18:52:43 发布