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 ...
随机推荐
- date,datetime,timestamp 的区别
date 表示年月日,如YY-MM-DD datetime 表示年月日和时间信息,如YY-MM-DD HH:MM:SS datestamp 和datetime表示的信息相同,但时间范围不同 时间范围 ...
- ubuntu tips
1.ibus-setup 2.tips:
- intellij idea 12 搭建maven web项目 freemarker + spring mvc
配置spring mvc ,写这篇文章的时候spring已经出了4.0 这里还是用稳定的3.2.7.RELEASE,先把spring和freemarker配置好 1.spring mvc配置 在web ...
- ubuntu 安装python mysql模块
Installation Starting with a vanilla Lucid install , install pip and upgrade to the latest version: ...
- 《Windows编程循序渐进》——MFC封装机制详解
单文档
- mobiscroll 插件札记(一)
mobiscroll 插件笔记(一) 文章参照 http://www.cnblogs.com/headwolf/archive/2013/12/23/3487207.html 最近切一个移动页面,需 ...
- @Transactional注解详解
默认遇到throw new RuntimeException("...");会回滚 需要捕获的throw new Exception("...");不会回滚 ...
- Java Object 对象拷贝答疑
Java Object 对象拷贝答疑 @author ixenos 摘要:在对象的clone过程需要注意的几点.关于关键字this.super 关于clone[对象拷贝] 在实际编程过程,有时候我们会 ...
- 浙大 pat 1007题解
Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, ...
- 禁止使用test类的就是禁止使用本来的$this对象.可以调用父类的对象
public function __construct() { parent::__construct( ); parent::__construct( ); if(!APP_DEBUG ) die( ...