莉露C++编写题解 2846: 统计数字字符个数 解题思路:getline原句,for挨个判断,sizeof(s)=strlen(s)+1,但C++不可用strlen。注意事项:if(s[i]>=48&&s[i]<=57)可写作if(s[i]>='0'&&s[i]<='9')sizeof(s)-1可写作s.size() 题解列表 2026年02月27日 0 点赞 0 评论 254 浏览 评分:0.0
2846:统计字符数组中的数字字符的个数 解题思路:注意事项:参考代码:#includeintmain(){charstr[255];inti,count=0;gets(str);for(i=0;str[i]!='\0';i++){if(str[i]>='0'&&str[i]<='9& 题解列表 2025年10月30日 3 点赞 0 评论 724 浏览 评分:10.0
2025/8/11刷题记录 摘要:解题思路:输入有空格就不能用scanf注意事项:参考代码:#include <stdio.h>#include <string.h>int main(){ &nbs…… 题解列表 2025年08月11日 1 点赞 0 评论 492 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:s = input() c = 0 for i in s: if i.isdigit(): c += 1 print(c)…… 题解列表 2024年08月01日 1 点赞 0 评论 1420 浏览 评分:0.0
优质题解,回归真神的初始途径 摘要:解题思路:注意事项:参考代码:chuan=input()j=0for fu in chuan: if fu.isdigit(): j+=1print(j)…… 题解列表 2024年07月25日 0 点赞 0 评论 993 浏览 评分:0.0
编写题解 2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch…… 题解列表 2024年07月22日 0 点赞 0 评论 1166 浏览 评分:9.9
2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch…… 题解列表 2024年07月18日 0 点赞 0 评论 817 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string s…… 题解列表 2024年07月13日 0 点赞 0 评论 574 浏览 评分:0.0
2846: 统计数字字符个数 ```cpp#includeusingnamespacestd;typedeflonglongll;constintN=1e5;chara[N];intmain(){llsum=0;cin.getline(a,225);for(inti=0;i='0'&&a[i] 题解列表 2024年07月12日 0 点赞 0 评论 521 浏览 评分:0.0
2846: 统计数字字符个数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e5;char a[N];int main(){ …… 题解列表 2024年07月11日 0 点赞 0 评论 578 浏览 评分:0.0