首页 > 其他 > 详细

hdu2030

时间:2015-10-24 21:58:15      阅读:291      评论:0      收藏:0      [点我收藏+]

http://acm.hdu.edu.cn/showproblem.php?pid=2030

 1 #include<stdio.h>
 2 #include<math.h>
 3 #include<string.h>
 4 #include<iostream>
 5 using namespace std;
 6 
 7 
 8 
 9 int main()
10 {
11     //freopen("in.txt","r",stdin);
12     int n;
13     char s[501];
14     cin>>n;
15     getchar();
16     while(n--)
17     {
18         int sum=0;
19         gets(s);
20         int len=strlen(s);
21         for(int i=0;i<len;i++)
22         {
23             if(s[i]<0)
24             sum++;
25         }
26         sum/=2;
27         printf("%d\n",sum);
28     }
29     return 0;
30 }

 

hdu2030

原文:http://www.cnblogs.com/xuesen1995/p/4907672.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!