Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- string s;
- cin >> s;
- int cnt=0;
- for (int i = 0; i<s.size(); i++) {
- if (s[i]=='0') {
- cnt++;
- } else {
- char s1;
- s1='a'+cnt;
- cnt=0;
- cout << s1;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement