#T672. 字符出现位置
字符出现位置
Description
Please help Xiao Gua find the position of the first occurrence of a specific character in a string.
Input Format
The first line contains an integer n (1 ≤ n ≤ 10000), representing the length of the string. The second line contains a string of length n, where each character is guaranteed to be a lowercase letter. The third line contains a character, representing the character to be searched for.
Output Format
Output a single integer representing the position of the first occurrence of the character in the string (indexed from 0). If the character does not appear in the string, output -1.
CodesOnline