CT557

Chavi Counts the banners

EasyL2 · Byte BanditAcceptance: 0.0%XP: 10

Deep in the ivory gates of Alabast, Chavi studies rows of banners entries. One clean number will settle the guild's oldest argument. 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| <= 180.

Example 1:

Input: ahpyjbmkkfbmzyqyqnoeckdletoaemotfkeiduwninqsgscciulwfxymelmsfennyuyltrpphhtcjhapjddsvvezf gfbyyhefftsmmmdepnznhiwklzrimrlyyudbcznvarpbpyojzualashmdhgejevlnjjcjwjzvprtsqnyiiljamjdkuzrjmssnenbyhgheikqwoi
Output: 0

Example 2:

Input: ve ggrocypvqtxazdkjnqubgnnicsziwxobxpnmvrjhpsurofyssmujmpyjtwmoemhdaobbazwmssizivlkwdaqwsffipahatep
Output: 0

Example 3:

Input: kgaaatmyeagdetzggcswortcyyypdvegofmxtemjwxgcbogfvqzmspmnvwoabhtoweikjwilnbmfprlhuyweocvbqdjqmymyfbvokvugtvoyxlhokbaofxvigzdatdzjfehfewlybzdeteitmzpefeygfcolnuyrpgzir srevpjd
Output: 0

Constraints:

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

Loading...
Test Cases:No test cases
No test cases available.
Chavi Counts the banners - EASY Coding Problem | CodeTikki