Every season at the gristmill of Rye Hollow, someone must reconcile two mismatched ledgers. This year the task falls to Opal, armed only with the labels register. Task: Print the length of the longest common prefix of s and t. Input format: Two lines: string s, then string t. Output format: Print the common prefix length. Constraints: 1 <= |s|,|t| <= 1938.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= |s|,|t| <= 1938.
