当前位置:网站首页>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();
}
}
边栏推荐
- Jetpack compose tutorial
- 添加命名空间声明
- . Net ORM framework hisql practice - Chapter 2 - using hisql to realize menu management (add, delete, modify and check)
- 1003 Emergency(25 分)(PAT甲级)
- Pytorch学习(四)
- Summary and sorting of 8 pits of redis distributed lock
- Leetcode fizzbuzz C # answer
- Educational Codeforces Round 22 E. Army Creation
- Wireshark网络抓包
- Niuke Xiaobai monthly race 7 I new Microsoft Office Word document
猜你喜欢
如何使用Async-Awati异步任務處理代替BackgroundWorker?
C# 使用StopWatch测量程序运行时间
Summary and sorting of 8 pits of redis distributed lock
Online sql to excel (xls/xlsx) tool
FPGA时序约束分享01_四大步骤简述
TCP两次挥手,你见过吗?那四次握手呢?
线上数据库迁移的几种方法
黑马程序员-软件测试--09阶段2-linux和数据库-31-43修改文件权限字母发的说明,-查找链接修改文件,查找文件命令,链接文件,压缩解压方式,vi编辑器基本使用,
PolyFit软件介绍
“只跑一趟”,小区装维任务主动推荐探索
随机推荐
1003 emergency (25 points) (PAT class a)
node_ Exporter deployment
26. Delete the duplicate item C solution in the ordered array
如何使用Async-Awati异步任務處理代替BackgroundWorker?
ftp、sftp文件传输
1006 sign in and sign out (25 points) (PAT class a)
FPGA时序约束分享01_四大步骤简述
YOLOv5s-ShuffleNetV2
牛客小白月赛7 E Applese的超能力
Opencv functions and methods related to binary threshold processing are summarized for comparison and use
Have you guys ever used CDC direct Mysql to Clickhouse
1672. Total assets of the richest customers
1011 World Cup Betting (20 分)(PAT甲级)
一文掌握数仓中auto analyze的使用
MySQL数据库基本操作-DDL | 黑马程序员
Add namespace declaration
Unity adds a function case similar to editor extension to its script, the use of ContextMenu
测试工程师如何“攻城”(下)
项目中遇到的线上数据迁移方案1---总体思路整理和技术梳理
BCG 使用之新建向导效果