CT802

Jatin and the Shared Opening

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Before the gates of the garden city of Petalbrook close for winter, Jatin must finish the charms 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| <= 58.

Example 1:

Input: hsgondjfknnyrjaxnzjsk msv
Output: 0

Example 2:

Input: bsqwrnhoisuhc p
Output: 0

Example 3:

Input: wjgxmroxyaodoxbbnfmbhvkekxwfdixgshctlnwnfehsvs wjgxmropfh
Output: 7

Constraints:

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

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