#abc280c. C - Extra Character
C - Extra Character
Score : points
问题描述
你将获得两个字符串 和 。其中, 由小写英文字母组成,而 是在 中插入一个小写英文字母后得到的。
要求找出在 中插入字符的位置。 如果有多个可能的位置,则找到任意一个即可。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given strings and . consists of lowercase English letters, and is obtained by inserting a lowercase English letter into .
Find the position of the inserted character in .
If there are multiple candidates, find any of them.
Constraints
- consists of lowercase English letters.
- is obtained by inserting a lowercase English letter into .
Input
The input is given from Standard Input in the following format:
Output
Print an integer , representing that the inserted character is the -th character from the beginning of . If there are multiple possible answers, printing any of them is accepted.
Sample Input 1
atcoder
atcorder
Sample Output 1
5
The -th character from the beginning of , r
, is inserted.
Sample Input 2
million
milllion
Sample Output 2
5
One of the -rd, -th, and -th characters from the beginning of is inserted. Thus, printing any one of , , and is accepted.
Sample Input 3
vvwvw
vvvwvw
Sample Output 3
3
update @ 2024/3/10 11:46:04