标签:style blog class code c tar
#include<iostream> #include<string> #include<cstring> #include<algorithm> using namespace std; int main() { int t; string s; cin>>t; while(t--) { cin>>s; int ls=s.length(); int ll=1; for(int i=1;i<ls;i++) { if(s[i]!=s[i-1]) { cout<<ll<<s[i-1]; ll=1; } else ll++; } cout<<ll<<s[ls-1]; cout<<endl; } system("pause"); return 0; }
标签:style blog class code c tar
原文地址:http://www.cnblogs.com/baoluqi/p/3734379.html