#include <stdio.h>
int main()
{
int n;
char c,enter;
scanf("%d%c",&n,&enter); //enter 接受回车键
while (n--)
{
int count=0;
while (scanf("%c",&c)!=EOF)
{
if (c=='\n') break; // \n 回车
else if (c>='0'&&c<='9')
count++;
}
printf("%d\n",count);
}
}
杭电oj 2017 字符串的统计
最新推荐文章于 2023-06-01 20:05:37 发布