hdu-2030-汉字统计

#include<stdio.h>
#include<string.h>
int main()
{
   int n,i,k,t;
   char s[10000];
   scanf("%d",&n);
   getchar();
   while(n--)
   {
    t=0;
     gets(s);
  k=strlen(s);
  for(i=0; i<k; i++)
   if(s[i]<0)
           t++;
   printf("%d\n",t/2);  
   }
   return 0;
}


posted @ 2014-07-22 19:30  wojiaohuangyu  阅读(12)  评论(0)    收藏  举报