Given a word s, return a string where the first character appears once, the second twice, the third three times, and so on, with the groups separated by -. Characters keep their original case.
Examples
Input: s = "abc"
Output: "a-bb-ccc"
Input: s = "Hi!"
Output: "H-ii-!!!"
Constraints
0 <= len(s) <= 60smay contain letters, digits and punctuation (no spaces)
Goals
- Repeat a string with `*`
- Combine pieces with `'-'.join`
- Use the position of each character