杭电OJ2017
#include<stdio.h>
int main(){
int n=0;
while(scanf("%d",&n)!=EOF){
int count[100];
for(int i =0;i< n;i++){
count[i]=0;
char str[100];
scanf("%s",str);
for(int j =0;j< 100&&str[j]!='\0';j++){
if(str[j] >='0'&&str[j]<='9'){
count[i]++;
}
}
}
for(int i = 0 ;i<n;i++){
printf("%d\n",count[i]);
}
}
return 0;
}