You are given an encoded string s and an integer k.
The encoded string is decoded to a tape by reading characters one by one according to the following rules:
If the character read is a letter, that character is appended to the tape.
If the character read is a digit
Return the
Constraints:
s.length
s consists of lowercase English letters and digits from
s starts with a letter.
k
It is guaranteed that k is less than or equal to the length of the decoded string.
The decoded string is guaranteed to have less than
You are given an encoded string s and an integer k.
The encoded string is decoded to a tape by reading characters one by one according to the following rules:
If the character read is a letter, that character is appended to the tape.
If the character read is a digit
Return the
Constraints:
s.length
s consists of lowercase English letters and digits from
s starts with a letter.
k
It is guaranteed that k is less than or equal to the length of the decoded string.
The decoded string is guaranteed to have less than