hdu2030
http://acm.hdu.edu.cn/showproblem.php?pid=2030
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<iostream>
using namespace std; int main()
{
//freopen("in.txt","r",stdin);
int n;
char s[];
cin>>n;
getchar();
while(n--)
{
int sum=;
gets(s);
int len=strlen(s);
for(int i=;i<len;i++)
{
if(s[i]<)
sum++;
}
sum/=;
printf("%d\n",sum);
}
return ;
}
hdu2030的更多相关文章
- hdu2030 汉字统计
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2030 解题思路:主要考察汉字的编码方式, 汉字机内码在计算机的表达方式的描述是,使用二个字节,汉字的每 ...
- (注意格式,代替C++的getchar())汉字统计hdu2030
汉字统计 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submi ...
- 汉字统计(hdu2030)
输入格式:一个整型,再循环带有空格的字符串 思考:用scanf_s()函数输入整型,然后一个大循环,再用gets_s()函数输入带空格的字符串. 注意:scanf_s()函数多加了%c,&d, ...
- OJ题目分类
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 P ...
- HDU100题简要题解(2030~2039)
HDU2030 汉字统计 题目链接 Problem Description 统计给定文本文件中汉字的个数. Input 输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本. Output ...
随机推荐
- ubuntu下手动配置apache2.4.12
(apache2也可以使用 sudo apt-get install apache2来安装,下面来讲解下如何手动安装配置apache2) 在安装apache2之前,先要安装apache2的依赖项,ap ...
- scrapy 按顺序抓取text内容
需求:获得如下li.clearfix 下的所有text,并且按顺序输出 1. x.css('div.reply-doc h4 a::text').extract(); 2. x.css('div.r ...
- DemoKit编译过程错误
1.编译出错: 2.原因(将代码注释):
- Balanced Numbers(数位dp)
Description Balanced numbers have been used by mathematicians for centuries. A positive integer is c ...
- HDU 1085 多重背包转化为0-1背包问题
题目大意: 给定一堆1,2,5价值的硬币,给定三个数表示3种价值硬币的数量,任意取,找到一个最小的数无法取到 总价值为M = v[i]*w[i](0<=i<3) 那么在最坏情况下M个数都能 ...
- Codeforces Round #240 (Div. 2) C Mashmokh and Numbers
, a2, ..., an such that his boss will score exactly k points. Also Mashmokh can't memorize too huge ...
- 使用spring框架提供的处理中文乱码的过滤器
在web-xml中直接写上spring框架提供的过滤器即可 <filter> <filter-name>encoding</filter-name> <fil ...
- react-浏览后的想法
- 用JQuery实现选中select里面的option显示对应的div
HTML: <select name="" onchange="select(this)"> <option value="1&q ...
- [Vue-rx] Disable Buttons While Data is Loading with RxJS and Vue.js
Streams give you the power to handle a "pending" state where you've made a request for dat ...