1 Star 0 Fork 0

LLL2343 / vJudge

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
1585.cpp 474 Bytes
一键复制 编辑 原始数据 按行查看 历史
lll2343 提交于 2022-03-02 22:03 . 初始化
#include<stdio.h>
#include<iostream>
#include<string>
#include<string.h>
using namespace std;
const int maxn = 100;
int main(){
int n;
string s;
scanf("%d",&n);
while(n--){
cin>>s;
int len = s.size();
int i=0,j=1,ans=0;
for(;i<len;i++){
if(s[i]=='X'){
j = 1;
}
else{
ans += j;
j++;
}
}
printf("%d\n",ans);
}
}
1
https://gitee.com/lll2343/v-judge.git
git@gitee.com:lll2343/v-judge.git
lll2343
v-judge
vJudge
master

搜索帮助