题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2017
//C++代码
#include<iostream>
#include<cstring>
#include<cctype>
using namespace std;
int main(){
int n,i,ans;
char a[1000];
cin>>n;
while(n--){
cin>>a;
for(ans=0,i=0;i<strlen(a);i++){
if(isdigit(a[i])) ans++;
}
cout<<ans<<endl;
}
return 0;
}