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