#include<bits/stdc++.h> using namespace std; int main(){ int i,c=0; char s[100]; gets(s); for(i=0;i<strlen(s);i++){ c++; if(s[i]!=s[i+1]){ if(c==1) cout<<s[i]; else cout<<c<<s[i]; c=0; } } return 0; } /************************************************************** Problem: 1103 User: wtq001 Language: C++ Result: Accepted Time:12 ms Memory:2076 kb ****************************************************************/