NOI / 1.7编程基础之字符串 01统计数字字符个数
http://noi.openjudge.cn/ch0107/solution/31685163/
C++参考代码:
#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
int main()
{
string s;
getline(cin, s);
int len,cnt = 0;
len=s.size();
for (int i = 0; i < len; i++)
{
if (s[i] >= '0' && s[i] <= '9')
{
cnt++;
}
}
cout << cnt;
return 0;
}
python3代码:
n = input()
c = 0
for i in n:
if i.isnumeric():
c += 1
print(c)
1.6编程基础之一维数组
1.7编程基础之字符串
1.8编程基础之多维数组
1.9编程基础之顺序查找
1.10编程基础之简单排序
电子协会 青少年软件编程等级考试 C语言历年真题
电子学会 全国青少年软件编程等级考试(三级--八级)
电子学会 青少年编程等级考试 C语言 1级-10级 学习资料集
电子学会 全国青少年软件编程等级考试标准 十级标准及相关资料
电子学会 全国青少年软件编程等级考试标准 十级标准及相关资料_青少年软件编程等级标准_dllglvzhenfeng的博客-CSDN博客
电子学会 青少年软件编程等级考试 C语言 9 级
科技前沿与工程前沿
20世纪最佳12部学术专著
飞行汽车,未来很可能走进你的生活中
第4次工业革命介绍与相关书籍及视频等
芯片与EDA软件
2022研究前沿 2022全球工程前沿