题解 | #公共子串计算#

公共子串计算

https://www.nowcoder.com/practice/98dc82c094e043ccb7e0570e5342dd1b

s1 = input().strip()
s2 = input().strip()

t1 = 0

re = 1
for i in range(len(s1)):
    while s1[i:i+re] in s2 and i+re <= len(s1):
        re+=1 

print(re-1)

全部评论

相关推荐

野猪不是猪🐗:我assume that你must技术aspect是solid的,temperament也挺good的,however面试不太serious,generally会feel style上不够sharp
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务