当前位置:网站首页>Openjudge: count the number of numeric characters
Openjudge: count the number of numeric characters
2022-07-28 05:36:00 【Programmer system】
describe
Enter a line of characters , Count out the number of digital characters .
Input
One line string , The total length does not exceed 255.
Output
Output is 1 That's ok , The number of numeric characters in the output string .
The sample input
Peking University is set up at 1898.
Sample output
4
Code 1
s = input()
sum = 0
for i in s:
if '0'<= i <='9':
sum += 1
print(sum)Code 2
s = input()
sum = 0
for i in s:
if i.isdigit():
sum += 1
print(sum)边栏推荐
- Oracle用sql查询某张表的字段信息(字段类型、长度等)
- mysql 为查询结果增加序号
- 多系统架构设计思考
- C language: addition and deletion of linked list in structure
- regular expression
- ByteBuffer.position 抛出异常 IllegalArgumentException
- openjudge:判断字符串是否为回文
- Scope, execution process and life cycle of bean
- 科研论文写作方法:在方法部分添加分析和讨论说明自己的贡献和不同
- LocalDateTime去掉T,JSONField失效
猜你喜欢

Multi module packaging: package: XXX does not exist

Digital twin solutions inject new momentum into the construction of chemical parks

repackag failed: Unable to find main class

Scope, execution process and life cycle of bean

latex和word之间相互转换

蒸馏模型图

Flask Development & get/post request

mysql 为查询结果增加序号

论文写作用词

First acquaintance with C language (1)
随机推荐
MySQL uses list as a parameter to query
LocalDateTime去掉T,JSONField失效
24小时内的时间段无交叉
What are the methods of array objects in Es5 and what are the new methods in ES6
openjudge:校园食宿预订系统
21 day SQL punch in summary
Non functional test
First acquaintance with C language (1)
深度学习医学图像模型复现
Personal summary of restful interface use
Response < t > class
PyTorch 使用 MaxPool 实现图像的膨胀和腐蚀
架构设计思考之一(SSO设计)
【idea插件神器】教你如何使用IDEA一键set实体类中所有属性
latex使用\hl进行高亮时遇到引用总是报错,显示少了括号或者多了括号
yandex robots txt
Learning of image enhancement evaluation index -- structural similarity SSIM
JUC笔记
Thinking on multi system architecture design
C language: realize the simple function of address book through structure