当前位置:网站首页>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)边栏推荐
- 24小时内的时间段无交叉
- repackag failed: Unable to find main class
- Confused, I'm going to start running in the direction of [test]
- 多模块打包:程序包:xxx不存在
- VMware Workstation 与 Device/Credential Guard 不兼容。禁用 Device/Credential Guard
- regular expression
- List < long >, list < integer > convert each other
- Scanf function of input and output function in C language
- 数据库面试
- Localdatetime removes T, and jsonfield is invalid
猜你喜欢

JMeter related knowledge sorting

Distillation model diagram

First acquaintance with C language (1)

ByteBuffer. Position throws exception illegalargumentexception

正则表达式

Edge calculation kubeedge+edgemash

visio如何快速生成相同的图案,生成图像矩阵

Writing methods of scientific research papers: add analysis and discussion in the method part to explain their contributions and differences

mysql 为查询结果增加序号

论文模型主图范例
随机推荐
动态卷积的本质
SSM project quick build project configuration file
New arrow function in ES6
IDEA配置 service(Run Dashboard) 服务,多模块同时启动
oracle查看锁表语句、解锁方法
Digital twin solutions inject new momentum into the construction of chemical parks
ssm项目快速搭建项目配置文件
How about ink cloud?
Multi module packaging: package: XXX does not exist
ECCV22 最新54篇论文主图整理
Performance test classification
openjudge:判断字符串是否为回文
How should programmers keep warm when winter is coming
openjudge:字符串最大跨距
CentOS7安装MySQL5.7
使用navicat或plsql导出csv格式,超过15位数字后面变成000(E+19)的问题
7. < tag string and API trade-offs> supplement: Sword finger offer 05. replace spaces
蒸馏模型图
Video twins: the starting point of informatization upgrading of smart Parks
openjudge:找出全部子串位置