HDU 2017

 1 #include<stdio.h>
 2 
 3 int main()
 4 {
 5         int T;
 6         char st[10000];
 7         scanf("%d",&T);
 8         while(T--)
 9         {
10         int x=0;
11         int i;
12         scanf("%s",st );
13         for(i=0;st[i];++i )
14         {
15             if( st[i]<=57&&st[i]>=48 )
16             x++;
17         }
18         printf("%d\n",x);
19     }
20 }
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章