当前位置:网站首页>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();
}
}
边栏推荐
- Stream流
- 1005 Spell It Right(20 分)(PAT甲级)
- Jetpack Compose 教程
- 项目中遇到的线上数据迁移方案1---总体思路整理和技术梳理
- Pointnet/Pointnet++点云数据集处理并训练
- An example of multi module collaboration based on NCF
- How test engineers "attack the city" (Part 2)
- Bi skills - permission axis
- 26. Delete the duplicate item C solution in the ordered array
- Pytorch学习(四)
猜你喜欢
Explore the contour drawing function drawcontours() of OpenCV in detail with practical examples
English grammar_ Noun - use
用实际例子详细探究OpenCV的轮廓绘制函数drawContours()
大div中有多个div,这些div在同一行显示,溢出后产生滚动条而不换行
Mysql database basic operation -ddl | dark horse programmer
与二值化阈值处理相关的OpenCV函数、方法汇总,便于对比和拿来使用
升级智能开关,“零火版”、“单火”接线方式差异有多大?
PointNeXt:通过改进的模型训练和缩放策略审视PointNet++
Hough Transform 霍夫变换原理
Bi skills - permission axis
随机推荐
测试工程师如何“攻城”(下)
Educational codeforces round 22 E. Army Creation
HDU 1097 A hard puzzle
Educational Codeforces Round 22 E. Army Creation
偏移量函数及开窗函数
Shell 编程核心技术《三》
“只跑一趟”,小区装维任务主动推荐探索
Shell programming core technology II
Jetpack Compose 教程
安徽 中安在线文旅频道推出“跟着小编游安徽”系列融媒体产品
HDU 6440 2018 Chinese college student program design network competition
92. (cesium chapter) cesium building layering
1005 Spell It Right(20 分)(PAT甲级)
.NET ORM框架HiSql实战-第二章-使用Hisql实现菜单管理(增删改查)
2021 Hefei informatics competition primary school group
【问题】druid报异常sql injection violation, part alway true condition not allow 解决方案
1011 World Cup Betting (20 分)(PAT甲级)
Educational Codeforces Round 22 E. Army Creation
Mysql database basic operation -ddl | dark horse programmer
Pythagorean number law (any three numbers can meet the conditions of Pythagorean theorem)