标签:style blog http color os io for art
#include <iostream> #include <cstdio> #include <cstring> using namespace std; int main() { char s[100]; int i,j,n,ans; cin>>n; getchar(); while (n>0) { n--; gets(s); ans=0; j=0; int len=strlen(s); for (i=0;i<len;i++) { if (s[i]==‘O‘){ j++; ans+=j; } if (s[i]==‘X‘) j=0; } cout<<ans<<endl; } }
标签:style blog http color os io for art
原文地址:http://www.cnblogs.com/bingolibing/p/3869156.html