#K35427. Decode String
Decode String
Decode String
Problem Description:
Given an encoded string, return its decoded string. The encoding rule is: \(k[encoded\_string]\), where the encoded string inside the square brackets is repeated exactly \(k\) times. You may assume that the input string is always valid (no extra white spaces, and the brackets are well-formed).
For example:
3[a]2[bc]
returnsaaabcbc
3[a2[c]]
returnsaccaccacc
inputFormat
The input consists of a single line containing the encoded string.
outputFormat
Output a single line containing the decoded string.
## sample3[a]2[bc]
aaabcbc