Vowel Counting
Vowel Counting
Time Limit : 2000/1000ms (Java/Other) Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 58 Accepted Submission(s) : 18
#include <stdio.h>
#include <stdlib.h>
#include <string.h> int main()
{
int T,L,i;
char a[];
scanf("%d",&T);
while(T--)
{
scanf("%s",a);
L=strlen(a);
for(i=;i<L;i++)
{
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u')
{
a[i]-=;
continue;
}
else if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
{
continue;
}
else
{
if(a[i]>='A'&&a[i]<='Z')
{
a[i]+=;
continue;
}
}
}
printf("%s\n",a);
}
return ;
}
Vowel Counting的更多相关文章
- 杭电oj 3079 Vowel Counting
Tips:可以先将输入的字符串全部转化为小写字母,然后再将元音字母变为大写,时间复杂度O(n) #include<stdio.h> #include<string.h> #in ...
- HDU 3079 Vowel Counting (水题。。。判断元音)
题意:n个字符串,如果元音就是输出大写,否则输出小写. 析:没啥可说的,只要判断AEIOU就OK了. 代码如下: #include <iostream> #include <cstd ...
- 杭电OJ(HDU)-ACMSteps-Chapter Two-《An Easy Task》《Buildings》《decimal system》《Vowel Counting》
http://acm.hdu.edu.cn/game/entry/problem/list.php?chapterid=1§ionid=2 1.2.5 #include<stdio.h> ...
- 萌新笔记——Cardinality Estimation算法学习(二)(Linear Counting算法、最大似然估计(MLE))
在上篇,我了解了基数的基本概念,现在进入Linear Counting算法的学习. 理解颇浅,还请大神指点! http://blog.codinglabs.org/articles/algorithm ...
- POJ_2386 Lake Counting (dfs 错了一个负号找了一上午)
来之不易的2017第一发ac http://poj.org/problem?id=2386 Lake Counting Time Limit: 1000MS Memory Limit: 65536 ...
- ZOJ3944 People Counting ZOJ3939 The Lucky Week (模拟)
ZOJ3944 People Counting ZOJ3939 The Lucky Week 1.PeopleConting 题意:照片上有很多个人,用矩阵里的字符表示.一个人如下: .O. /|\ ...
- find out the neighbouring max D_value by counting sort in stack
#include <stdio.h> #include <malloc.h> #define MAX_STACK 10 ; // define the node of stac ...
- 1004. Counting Leaves (30)
1004. Counting Leaves (30) A family hierarchy is usually presented by a pedigree tree. Your job is ...
- 6.Counting Point Mutations
Problem Figure 2. The Hamming distance between these two strings is 7. Mismatched symbols are colore ...
随机推荐
- 【.NET】XML文件的创建,修改,删除
类名:XML /// 1.创建XML文档 /// 2.在根节点下增加子元素 /// 3.在元素下增加子元素 /// 4.获取类型为制定值的一组节点 /// 5.抓取网页上的xml文档赋值给XmlDoc ...
- window.open打开新页面居中
var iHeight = 500;//新打开页面的高 var iWidth = 800;//新打开页面的宽 var iTop = (window.screen.height-30-iHeight)/ ...
- javaWEB总结(12):JSP页面的九个隐含对象
前言 jsp本质上是一个servlet,而在jsp中有九个不用声明就可以使用的对象,我们叫他隐含对象.本文基于上文所写,如有需要可查看上一篇文章javaWEB总结(11):JSP简介及原理. 打开上次 ...
- hdu1021
#include <stdio.h> int fib(int m){ int n_2=1,n_1=2,n,i; if(m==0)return 1; if(m==1)return 2; fo ...
- 第三课3、ROS的launch文件
1.launch 参数说明: pkg为节点的功能包,type为需要运行的那个节点,name为节点的名字,后面的参数可选 举个例子: 在工作空间中新建一个包: 然后再回到工作空间中去编译: 再在包目录下 ...
- 大数据时代之hadoop(六):hadoop 生态圈(pig,hive,hbase,ZooKeeper,Sqoop)
hadoop是有apache基金会所开发的分布式系统基础架构,其主要提供了两方面的功能:分布式存储和分布式计算. 其中分布式存储是分布式计算的基础,在hadoop的实现里面,提供了分布式存储的接口,并 ...
- 复习i++和++j
一,新建一个Default.aspx页面 在Default.aspx.cs
- 区块链Readme.md
#Welcome to Azure Blockchain Projects This Repo host Azure related blockchain and distributed ledger ...
- hdu和poj的基础dp30道
题目转自:https://crazyac.wordpress.com/dp%E4%B8%93%E8%BE%91/ 1.hdu 1864 最大报销额 唔,用网上的算法连自己的数据都没过,hdu的数据居然 ...
- Udemy - Angular 2 - The Complete Guide 笔记
1. install > npm install -g angular-cli 2. create app > ng new first-app 3. build app > cd ...