当前位置:网站首页>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();
}
}
边栏推荐
- Hough Transform 霍夫变换原理
- Generate XML elements
- Upgrade the smart switch, how much is the difference between the "zero fire version" and "single fire" wiring methods?
- 1005 Spell It Right(20 分)(PAT甲级)
- Wireshark网络抓包
- To sort out messy header files, I use include what you use
- Have you guys ever used CDC direct Mysql to Clickhouse
- 牛客小白月赛7 I 新建 Microsoft Office Word 文档
- 《工作、消费主义和新穷人》的微信读书笔记
- C# 使用StopWatch测量程序运行时间
猜你喜欢

TCP两次挥手,你见过吗?那四次握手呢?

西门子HMI下载时提示缺少面板映像解决方案

Detailed explanation of the binary processing function threshold() of opencv

黑马程序员-软件测试--08阶段2-linux和数据库-23-30-进程端口相关,修改文件权限,端口号信息的获取,程序和进程相关操作,linux命令案例

用实际例子详细探究OpenCV的轮廓绘制函数drawContours()

FPGA timing constraint sharing 01_ Brief description of the four steps

MySQL数据库基本操作-DDL | 黑马程序员

如何使用Async-Awati异步任务处理代替BackgroundWorker?

SSRS筛选器的IN运算(即包含于)用法

在线SQL转Excel(xls/xlsx)工具
随机推荐
线上数据库迁移的几种方法
26. Delete the duplicate item C solution in the ordered array
LM10丨余弦波动顺势网格策略
.NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
矩阵翻转(数组模拟)
Swagger突然发癫
Some thoughts on whether the judgment point is located in the contour
In flinksql, in addition to data statistics, is the saved data itself a state
Find the nth power of 2
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
Crawler (6) - Web page data parsing (2) | the use of beautifulsoup4 in Crawlers
黑马程序员-软件测试--08阶段2-linux和数据库-23-30-进程端口相关,修改文件权限,端口号信息的获取,程序和进程相关操作,linux命令案例
项目中遇到的线上数据迁移方案1---总体思路整理和技术梳理
Have you guys ever used CDC direct Mysql to Clickhouse
有关架构设计的个人思考(本文后续不断修改更新)
勾股数规律(任意三个数能够满足勾股定理需要满足的条件)
@transactional滥用导致数据源连接池耗尽问题
欧拉函数
Online data migration scheme encountered in the project 1 - general idea sorting and technical sorting
Bi skills - permission axis