题解 | #公共子串计算#
公共子串计算
https://www.nowcoder.com/practice/98dc82c094e043ccb7e0570e5342dd1b
s1 = input()
s2 = input()
a,b = '',''
count = 0
if len(s1)>len(s2):
a,b = s2,s1
else:
a,b = s1,s2
for i in range(len(a)):
for j in range(i+1,len(a)+1):
s = a[i:j]
if s in b and len(s)>count:
count = len(s)
print(count)