19 lines
325 B
Text
19 lines
325 B
Text
|
|
F reps(text)
|
|||
|
|
R (1 .< 1 + text.len I/ 2).filter(x -> @text.starts_with(@text[x..])).map(x -> @text[0 .< x])
|
|||
|
|
|
|||
|
|
V matchstr =
|
|||
|
|
|‘1001110011
|
|||
|
|
1110111011
|
|||
|
|
0010010010
|
|||
|
|
1010101010
|
|||
|
|
1111111111
|
|||
|
|
0100101101
|
|||
|
|
0100100
|
|||
|
|
101
|
|||
|
|
11
|
|||
|
|
00
|
|||
|
|
1’
|
|||
|
|
|
|||
|
|
L(line) matchstr.split("\n")
|
|||
|
|
print(‘'#.' has reps #.’.format(line, reps(line)))
|