C++ 代码
#include<iostream>
#include<cstring>
using namespace std;
char a[1010];
int main(){
int n = 0 ;
cin >> a;
n = sizeof(a);
for( int i=0 ; i<n ; i++ ){
if( a[i] >= '1' && a[i] <= '9'){
int x = a[i] - '0'-1;
char y=a[i-1];
while( x > 0){
cout << y;
x = x - 1;
}
}
else
cout << a[i];
}
return 0;
}