#include<iostream>
#include<string>
using namespace std;
int main()
{
int n,l;
cin>>n;
string str;
for(int i=1;i<=n;i++)
{
int sum=0,j=0;
cin>>str;
while(str[j]!='\0') //可以用str[i]表示string类型变量的第i个元素
{
if(str[j]>='0'&&str[j]<='9')
sum++;
j++;
}
cout<<sum<<endl;
}
}
杭电2017
最新推荐文章于 2020-04-11 14:59:30 发布