#include <iostream>
using namespace std;
int main(){
int n, count = 0;
char a[100];
cin >> n;
while (n){
cin >> a;
for (int i = 0; a[i] != '\0'; i++){
if (a[i] >= '0'&&a[i] <= '9')
count++;
}
cout << count << endl;
count = 0;
n--;
}
return 0;
}
杭电ACM2017:字符串统计
最新推荐文章于 2020-01-28 09:37:33 发布