题意看output就差不多理解了
代码如下:
#include <bits/stdc++.h> using namespace std; int main() { char ch; int number=0; while((ch=getchar())!=EOF) { if(ch>='0'&&ch<='9') { number+=ch-'0'; continue; } if(!(ch-'!')||!(ch-'\n')) cout<<endl; if(!(ch-'b')) ch=' '; for(int i=1; i<=number; ++i) cout<<ch; number=0; } return 0; }