SP25176 CMPSSTR - Compare Substring

Description

\* This problem is of autorship and property of TopCoder (www.topcoder.com/tc) and adapted by Alessandro B. for authorized use in URI OJ. \* Unauthorized reproduction of this problem statement without the prior written consent of TopCoder, Inc. is strictly prohibited. Find the longest common substring between the two informed Strings. The substring can be any part of the String, including the entire String. If there is no common substring, return 0. The search is _case sensitive_ ('x' != 'X').

Input Format

The input contains several test cases. Each test case is composed by two lines that contains a string each. Both input Strings will contain between 1 and 50, inclusive, letters (a-z, A-Z), and/or spaces.

Output Format

The length of the longest common substring between the two Strings.