题解 2846: 统计数字字符个数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

2846: 统计数字字符个数

摘要:解题思路:了解字符串的处理注意事项:只需计算数字的个数,注意字符串结尾的&#39;\0&#39;参考代码:#include<stdio.h>#include<string.h>      //处理字符……

统计数字字符个数(python)

摘要:解题思路:注意事项:参考代码:a=input()s=[]for i in a:    if i in&#39;1234567890&#39;:        s.append(i)print(len(……

2846: 统计数字字符个数Java

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {    public static void main(String[] args……

2846: 统计数字字符个数

摘要:解题思路:注意事项:参考代码:s = input()  c = 0  for i in s:      if i.isdigit():          c += 1  print(c)……

2846: 统计数字字符个数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N = 1e7;ch……

2846: 统计数字字符个数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string s……