Auto commit

This commit is contained in:
smallkun 2025-04-01 20:11:46 +08:00
parent 53b34d917f
commit c573ab7540

View File

@ -29,12 +29,25 @@ char *fun(char input[])
} }
int outputIndex = 0; int outputIndex = 0;
/**********Program**********/ /**********Program**********/
int i; int i,s,t;
for(i=0;i<len;i++){ for(i=0;i<len;i++){
while(input[i]=='['){ if(input[i]=='['){
i++;
s=0;
while(input[i] <'a'||input[i]>'z'){
s=s*10+(input[i] - 48);
i++;
} }
} }
while(s>0){
t=i;
while(input[t] != ']'){
output[outputIndex++] = input[t++];
}
s--;
}
}
output[outputIndex] = '\0';
/********** End **********/ /********** End **********/
return output; return output;
} }