牛客给定的范围是真的小,这是给我们暴力的机会吗
要是像leetcode那些变态的数据范围,恐怕要走动态规划才能ac了
不是求LCK都还挺简单的
def lcs(s1,s2):
	n = len(s1)
	maxlen = 0
	# 取其中一个字符串进行遍历即可
	for i in range(n):
		for j in range(i+1,n+1):
			# 如果满足s1的子串也在s2中
			if s1[i:j] in s2 and maxlen < len(s1[i:j]):
				maxlen = len(s1[i:j])
	return maxlen

s1 = input().strip()
s2 = input().strip()
print(lcs(s1,s2))