-->
当前位置:首页 > 题库

PROGRAMMING:Find the longest repeated true substring

Luz5年前 (2021-05-10)题库431
Given a string STR, find its longest repeated true substring s.
Note: the string length of S is less than that of str.
###Input format:
Enter a string STR, ending with a newline character.
###Output format:
Output two lines:
The first line: the original string str
The second line: the longest repeated substring s, ending with a new line character.
###Input example:
Here is a set of inputs. For example:
```in
abcabcaeabcae
```
###Output example:
The corresponding output is given here. For example:
```out
abcabcaeabcae
abcae
```







answer:If there is no answer, please comment