杭电ACM 2017

#include<stdio.h>

int main()

{

   int b;  

   char c;

      scanf("%d\n",&b);       

  while(b--)

   {

      int a=0;   

    while((c=getchar())!='\n')   

     {        

       if(c>='0'&&c<='9')    

        a++;   

     }

        printf("%d\n",a);

      }

    return 0;

}

原文地址:https://www.cnblogs.com/lMercury/p/2963247.html