s = input().strip() n = len(s) found = -1 # 遍历字符串,检查每个可能的三个连续字符 for i in range(n - 2): # 检查当前位置及后两个字符是否构成Bob(不区分大小写) if s[i].lower() == "b" and s[i + 1].lower() == "o" and s[i + 2].lower() == "b": found = i break # 找到第一个出现的位置就退出 print(found)
s = input().strip() n = len(s) found = -1 # 遍历字符串,检查每个可能的三个连续字符 for i in range(n - 2): # 检查当前位置及后两个字符是否构成Bob(不区分大小写) if s[i].lower() == "b" and s[i + 1].lower() == "o" and s[i + 2].lower() == "b": found = i break # 找到第一个出现的位置就退出 print(found)