Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as C++ by datpmt ( 6 years ago )
#include <iostream>
#include <stack>
#include <string>
using namespace std;
int main(){
string s;
getline(cin, s);
int start=0;
for(int i=0;i <= s.length();i++)
{
if(s[start]!=s[i])
{
cout<<s[start]<<i-start;
start=i;
}
}
return 0;
}
Revise this Paste