You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <cstdio>
|
|
#include <cstring>
|
|
#include <cctype>
|
|
using namespace std;
|
|
char buf[1048577];
|
|
int main()
|
|
{
|
|
int n;
|
|
scanf("%d",&n);
|
|
while(n--)
|
|
{
|
|
int ans=0;
|
|
scanf("%s",buf);
|
|
for(char* ptr=buf; *ptr; ptr++)
|
|
ans+=isdigit(*ptr);
|
|
printf("%d\n",ans);
|
|
}
|
|
return 0;
|
|
}
|