题解

lyq123 星空寂静 2023-10-01 16:20:21 2023-10-01 16:21:42 15

#include <bits/stdc++.h>

using namespace std;

char a[260]

//计数

int cnt;

int main() {

//输入 包含空格输入 

cin.getline(a,255);

//统计字符串中的数字字符  ‘0’-‘9’ 

for(int i=0; i<strlen(a); i++){

	//判断a[i]是否为 数字字符 

	if(a[i]>='0'&&a[i]<='9'){

		cnt++;
	}

}

//输出 

cout<<cnt;

return 0;

}

//随便拿,只要你问心无愧(其中有个小错,请自行修改)

{{ vote && vote.total.up }}