最长的1
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
第12题 连续“1”的长度
问题描述
小A同学给小B同学发送了一个长度为10的01字符串,小B同学需要找出该字符串中连续出现的1的最长序列的长度。
输入描述
一行,一个长度为10的01字符串 ( s )(仅包含字符'0'和'1')。
输出描述
一行,一个整数,表示字符串中连续1的最长序列的长度(若没有连续1则输出0)。
输入样例1
0111011001
输出样例1
3
输入样例2
0000000000
输出样例2
0
输入样例3
1111111111
输出样例3
10
初中组冲刺
- Status
- Done
- Rule
- ACM/ICPC
- Problem
- 8
- Start at
- 2025-5-22 16:15
- End at
- 2025-5-24 8:15
- Duration
- 40 hour(s)
- Host
- Partic.
- 37