C++ 代码
#include<cstdio>
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
string s1;
getline(cin,s1);
int num = 0;
for(char c:s1)
{
if(c >= '0' && c <= '9')
num ++;
}
cout << num <<endl;
return 0;
}