hdu2027
http://acm.hdu.edu.cn/showproblem.php?pid=2027
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<stdlib.h>
#include<string.h>
#include<algorithm>
using namespace std; int main()
{
//freopen("in.txt","r",stdin);
int n;
char s[];
scanf("%d",&n);
getchar();
while(n--)
{
gets(s);
int len=strlen(s);
int a=,e=,i=,o=,u=;
for(int j=;j<len;j++)
{
if(s[j]=='a')
a++;
else if(s[j]=='e')
e++;
else if(s[j]=='i')
i++;
else if(s[j]=='o')
o++;
else if(s[j]=='u')
u++;
}
printf("a:%d\n",a);
printf("e:%d\n",e);
printf("i:%d\n",i);
printf("o:%d\n",o);
printf("u:%d\n",u);
if(n!=)
printf("\n");
}
return ;
}
hdu2027的更多相关文章
- hdu-2027题&&gets/getchar的区别
hdu-2027题(水题~~~) 统计每个元音字母在字符串中出现的次数. Input输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串. Output对于每个测试实例输 ...
- HDU2027 统计元音
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; ; //此处 ...
- HDU2027:统计元音
Problem Description 统计每个元音字母在字符串中出现的次数. Input 输入数据首先包括一个整数n,表示测试实例的个数,然后是n行长度不超过100的字符串. Output 对于每个 ...
- hdu2027 trie树 字典树模板
#include <iostream> #include <cstdio> #include <cstring> #include <sstream> ...
- OJ题目分类
POJ题目分类 | POJ题目分类 | HDU题目分类 | ZOJ题目分类 | SOJ题目分类 | HOJ题目分类 | FOJ题目分类 | 模拟题: POJ1006 POJ1008 POJ1013 P ...
- HDU100题简要题解(2020~2029)
HDU2020 绝对值排序 题目链接 Problem Description 输入n(n<=100)个整数,按照绝对值从大到小排序后输出.题目保证对于每一个测试实例,所有的数的绝对值都不相等. ...
随机推荐
- PAT 1020. Tree Traversals
PAT 1020. Tree Traversals Suppose that all the keys in a binary tree are distinct positive integers. ...
- springcloud(九):熔断器Hystrix和Feign的应用案例
因为 feign 中已经支持了 Hystrix ,所以在 Feign 中使用 Hystrix 时,不需要导包,也不需要在入口类上面增加额外的注解: Feign 虽然支持了 Hystrix ,但是默认 ...
- 疫情控制(codevs 1218)
题目描述 Description H 国有 n 个城市,这 n 个城市用 n-1 条双向道路相互连通构成一棵树,1 号城市是首都, 也是树中的根节点. H 国的首都爆发了一种危害性极高的传染病.当局为 ...
- 进入DRF和ANGULAR的整合学习,这三篇入门内容一定要学好的
看来,DJANGO的模板功能是无法用啦, 学着用ANGLUAR的SERVICE,MODULE,CONTROLLER啦... http://engineroom.trackmaven.com/blog/ ...
- 转载 字符串hash
转载自:http://www.cnblogs.com/jiu0821/p/4554352.html 求一个字符串的hash值: •现在我们希望找到一个hash函数,使得每一个字符串都能够映射到一个整数 ...
- 【APIO2012】【BZOJ2809】派遣dispatching
2809: [Apio2012]dispatching Time Limit: 10 Sec Memory Limit: 128 MB Submit: 1932 Solved: 967 [Submit ...
- Node.js 博客实例(三)添加文件上传功能
原教程 https://github.com/nswbmw/N-blog/wiki/_pages的第三章 上传文件眼下有三种方法: 使用 Express 自带的文件上传功能,不涉及数据库 使用 For ...
- Android:Unable to resolve target ‘android-8’问题解决
在学习过程中,下载别人写过的代码,导入到eclipse,报错: Unable to resolve target 'android-8' 问题是项目版本号问题. 解决方法例如以下: 右击项目:Prop ...
- HDFS02
读取流程 写流程 ============SecondaryNameNode============ Namenode的一个快照 周期性的备份namenode 记录namenode中的metadata ...
- 我的Android进阶之旅------>Android中MediaRecorder.stop()报错 java.lang.RuntimeException: stop failed.【转】
本文转载自:http://blog.csdn.net/ouyang_peng/article/details/48048975 今天在调用MediaRecorder.stop(),报错了,java.l ...