Advertisement
Zuneve

wda

Nov 3rd, 2022
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. int main() {
  5. string s;
  6. cin >> s;
  7. int cnt=0;
  8. for (int i = 0; i<s.size(); i++) {
  9. if (s[i]=='0') {
  10. cnt++;
  11. } else {
  12. char s1;
  13. s1='a'+cnt;
  14. cnt=0;
  15. cout << s1;
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement