RE
查看原帖
RE
1349068
Zhangmocong楼主2025/6/15 21:00
#include<bits/stdc++.h>
using namespace std;

string f(){
    string s="",x="";
    int d;
    char c;
    while(cin>>c){
        if(c=='['){
            cin>>d;
            x=f();
            while(d--){
                s+=x;
            }
        }
        else if(c==']'){
            return s;
        }
        else s+=c;
    }
}

int main(){
    cout<<f();
    return 0;
}
2025/6/15 21:00
加载中...