Problems Description
<p> Do you know the Longest Common Substring? For example:<br> str1 = banana<br> str2 = cianaic<br> So the Longest Common Substring is "ana", and the length is 3. </p>
Input格式
<p> The input contains several test cases. Each test case contains two strings, each string will have at most 100000 characters. All the characters are in lower-case. Process to the end of file. </p>
Output格式
<p> For each test case, you have to tell the length of the Longest Common Substring of them. </p>
Sample
Sample Input 1
banana
cianaic
Sample Output 1
3
Submit Code
请先Login后Submit
🤖 AI 解题助手
OpenRouter
就绪