当前位置:网站首页>Niuke Xiaobai month race 7 F question
Niuke Xiaobai month race 7 F question
2022-07-04 19:37:00 【Acacia moon tower】
Title Description
Bob In the study DFS after , I invented a new search (luan) Cable (gao) Method , be called BFS(Bobby First Search).
This search is defined as : In a string , Find the first substring from front to back "Bob" Position of appearance .( Case insensitive )
Input description :
Enter a string without spaces S( May contain upper and lower case letters , Numbers ).(1 ≤ |S| ≤ 100)
Output description :
Output a number , Express "Bob" First occurrence ( Subscript from 0 Start ). If not , The output "-1".
Direct use JAVA Medium Indexof,,,,
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
String a = in.nextLine();
a = a.toLowerCase();
System.out.println(a.indexOf("bob"));
in.close();
}
}
边栏推荐
- Upgrade the smart switch, how much is the difference between the "zero fire version" and "single fire" wiring methods?
- To sort out messy header files, I use include what you use
- @transactional滥用导致数据源连接池耗尽问题
- TCP两次挥手,你见过吗?那四次握手呢?
- 反射(一)
- Detailed explanation of the binary processing function threshold() of opencv
- Shell programming core technology "three"
- 92. (cesium chapter) cesium building layering
- 与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用
- Crawler (6) - Web page data parsing (2) | the use of beautifulsoup4 in Crawlers
猜你喜欢
在线SQL转Excel(xls/xlsx)工具
Pointnet/Pointnet++点云数据集处理并训练
牛客小白月赛7 谁是神箭手
“只跑一趟”,小区装维任务主动推荐探索
MySQL数据库基本操作-DDL | 黑马程序员
Pythagorean number law (any three numbers can meet the conditions of Pythagorean theorem)
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
Online text line fixed length fill tool
mysql中explain语句查询sql是否走索引,extra中的几种类型整理汇总
There are multiple divs in the large div, which are displayed on the same line. After overflow, scroll bars are generated without line breaks
随机推荐
测试工程师如何“攻城”(上)
Unity editor extends C to traverse all pictures in folders and subdirectories
1003 Emergency(25 分)(PAT甲级)
Pytorch学习(四)
Leetcode fizzbuzz C # answer
kotlin 基本数据类型
Educational Codeforces Round 22 E. Army Creation
1672. Total assets of the richest customers
Shell programming core technology "three"
Allure of pytest visual test report
prometheus安装
Master the use of auto analyze in data warehouse
Opencv functions and methods related to binary threshold processing are summarized for comparison and use
Bi skills - permission axis
English语法_名词 - 使用
Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
牛客小白月赛7 F题
矩阵翻转(数组模拟)
HDU 1372 & POJ 2243 Knight Moves(广度优先搜索)
FPGA时序约束分享01_四大步骤简述