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