为啥RE
查看原帖
为啥RE
1495466
LINYUHENG2楼主2024/10/12 17:54
#include <bits/stdc++.h>
using namespace std;
string read(){
    int n;
    string s="",sl;
    char c;
    while(cin>>c){
        if(c=='['){
            cin>>n;
            sl=read();
            while(n--) s+=sl;
        }else{
            if(c==']') return s;
            else s+=c;
        }
    }
}

int main(){
    cout<<read();
    return 0;
}
2024/10/12 17:54
加载中...