← 返回 google 的题目列表Decode String
类型:online_judge
Write a function to decode a given encoded string in the format k[encoded_string] where k is a positive integer that represents the number of times encoded_string is repeated. The encoded_string contains lowercase letters. Implement decode_string(s: str) -> str. For example, given '3[a]2[bc]', the output should be 'aaabcbc'.
Example
Input
3[a]2[bc]