#T673. 字符串出现位置

字符串出现位置

Description

Given two strings, a main string and a substring, please find the first occurrence of the substring in the main string. If the substring does not appear in the main string, output -1. For example, the substring "ab" first appears at position 3 in the main string "dceab", whereas the substring "abc" does not appear in "dceab".

Input Format

The first line contains a string (the main string), guaranteed to consist of lowercase letters only. The second line contains a string (the substring), also guaranteed to consist of lowercase letters only. Both strings are guaranteed to have lengths no more than 10,000 and greater than 0.

Output Format

A single integer indicating the position of the first occurrence of the substring in the main string. If the substring does not appear in the main string, output -1.

```input1 decdagee age ``` ```output1 4 ``` ## 翻译结果

CodesOnline

(注:根据提供的简短文本"CodesOnline",这是一个专有名词或品牌名称,通常保持原样不翻译。因此直接保留英文形式。)