1978: 找出重复代码

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

小明负责维护项目下的代码,需要查找出重复代码,用以支撑后续的代码优化,请你帮助小明找出重复的代码。重复代码查找方法:以字符串形式给出两行代码(字符审长度1< length < 100,由英文字母、数字和空格组成),找出两行代码中的最长公共子串 注:如果不存在公共子串,返回空字符串

Input

输入的参数 text1,text2 分别表示两行代码

Output

输出任一最长公共子串

Sample Input Copy

hello123world1
hello123abc4

Sample Output Copy

hello123

Source/Category