09-27 leetcode 0880
链接 880. Decoded String at Index
题目
You are given an encoded string s. To decode the string to a tape, the encoded string is read one character at a time and the following steps are taken:
If the character read is a letter, that letter is written onto the tape.
If the character read is a digit d, the entire current tape is repeatedly written d - 1 more times in total.
Given an integer k, return the kth letter (1-indexed) in the decoded string.
题解
这题没啥好说的。。直接暴力写就行(
1 | class Solution: |
Comments