CT788

The Mossy sigils of Devi

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the observatory of Starfall close for winter, Devi must finish the sigils ledger - one figure at a time. 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| <= 136.

Example 1:

Input: pdajwqzltijnlvzugbdvruvscqkfwmtvdcplhpthgnxlhcmreyqdeaec av
Output: 0

Example 2:

Input: jsxgkvuemwqoizqajgmcfmwwvrbsbnmujtqvigfgawdlxrmbktlhkhasgxij izaanqittjmghalygpzjwrmovczmyxswrxtuhci
Output: 0

Example 3:

Input: isznhnpopsebeclsodpsswilnbmsfhtnrlovgpvoeqynwpmhzh ieduprfzrgukhtqizekucviroofsmddmmtscoumnjubxwfkcyzrqutxnxstinqcpfmqylawwzxstpbyomeiemxitcvltxutjotzhpmg
Output: 1

Constraints:

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

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