#include <iostream>
#include <stdio.h>
using namespace std;
int main() {
int c,n;
while(scanf("%d",&n)!=EOF) {
getchar();
for(int i=1; i<=n; i++) {
int t=1,sum=0;
while((c=getchar())!='\n') {
if(c=='O') {
sum+=t;
t++;
} else
t=1;
}
printf("%d\n",sum);
}
return 0;
}
}
/*注意 int c (不是char)*/
习题3-1 得分(Score)
最新推荐文章于 2023-05-05 21:27:41 发布