
[LeetCode] 1945. Sum of Digits of String After Convert (Python)
·
알고리즘/LeetCode
난이도: Easy 문제 설명You are given a string s consisting of lowercase English letters, and an integer k. Your task is to convert the string into an integer by a special process, and then transform it by summing its digits repeatedly k times. More specifically, perform the following steps:Convert s into an integer by replacing each letter with its position in the alphabet (i.e. replace 'a' with 1, 'b' ..