← 返回 bytedance 的题目列表String Compression in Kubernetes Style
类型:online_judge
bytedance
Given the string kubernetes, you need to convert it into k8s, i.e., keeping the first and last letter and using the count of the interior letters as a number. Write a function to perform this transformation, ensuring that the resultant string is unique. For a set of similar words, e.g., ["kubernetes", "kibernetes"], apply the transformation as described above and output a unique list of the transformed strings.
Example
Input
["kubernetes", "kibernetes"]