Biorąc pod uwagę ciąg tekstu, wyślij go jako „wieżę”.
Każdy plasterek łańcucha (formy 0:n) jest powtarzany 5*nrazy, więc pierwszy znak jest powtarzany 5 razy, a następnie pierwszy i drugi 10 razy itp.
Przykłady:
'hello' ->
['h']
['h']
['h']
['h']
['h']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
'cat' ->
['c']
['c']
['c']
['c']
['c']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
['c', 'a', 't']
Zasady:
Możesz wyprowadzić każdą warstwę jako listę znaków lub tylko ciąg ich połączonych ze sobą.
[["c","c","c","c","c"],["ca","ca","ca","ca","ca","ca","ca","ca","ca","ca"],...]?