又来水题~~~
#include<stdio.h> int main(){int n,count=0;char c;scanf("%d",&n);getchar();for(int i=0;i<n;i++){count=0;while(scanf("%c",&c)!= EOF && c != '\n'){if( c < 0 ){count++;}}printf("%d\n",count/2);}return 0; }
又来水题~~~
#include<stdio.h> int main(){int n,count=0;char c;scanf("%d",&n);getchar();for(int i=0;i<n;i++){count=0;while(scanf("%c",&c)!= EOF && c != '\n'){if( c < 0 ){count++;}}printf("%d\n",count/2);}return 0; }