8 条题解
-
1
Just split the string at every character '1', and you'll find that the number of the strings you get is one more than the number of the '1's. It's simply done!
My code, written in CSharp, is as below.
using System; namespace HydroOJ.ccf.CSPJ2019A { static class ProgramEntry { static void Main() { Console.WriteLine(Console.ReadLine().Split('1').Length - 1); } } }
- 1
信息
- ID
- 117
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- 递交数
- 161
- 已通过
- 98
- 上传者