CT929

The verses Shared Opening Puzzle

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Morning light hits the orchid house of Bloomglass as Lysander unrolls the day's manifest of verses. The tally will decide the next shipment. 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| <= 65.

Example 1:

Input: slqmegsghbcnzy slqmegsghbcnoj
Output: 12

Example 2:

Input: vpjsqbmlttflaewjvgtethvlsadztfxnerfywhplemiquerenxpitmmmhovdt vpjsqbmlttflaewjvgtethvlsadztfxnerfywhplemiquerenxpitmmmhovmvlve
Output: 59

Example 3:

Input: cnaxugfvcuugiyeulnxdotsxpislhjrzvayzzenifgrwurmbheihgawyv cnaxugfvcuugiyeulnxdotsxpislhjrzvayzzenifd
Output: 41

Constraints:

1 <= |s|,|t| <= 65.

Loading...
Test Cases:No test cases
No test cases available.