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 ...
随机推荐
- php+mysql 内联接 和 子查询
INNER JOIN(内连接):取得两个表中存在连接匹配关系的记录 $sql="SELECT * FROM subject as a INNER JOIN e_user as b ON a. ...
- QT源码剖析之QSS样式表
1. "QApplication::setStyleSheet()"设置样式表: 1. 创建新的样式表. 2. 设置新的样式. void QApplication::setStyl ...
- electron的艰难安装之旅
最近对前端开发很感兴趣,抽空研究了下前段的开发工具,发现比较流行的是sublime,atom,vscode等, 由于一直以来从事.net开发所以对vscode很感兴趣,在vscode的安装配置过程偶然 ...
- JAVA中String(字符串)课堂总结
一:Java编译器中关于字符串自动优化 例子一: 源代码: public class StringPool { public static void main(String args[]) { Str ...
- 转:详解JMeter正则表达式(2)
例如, 引用名称:MYREF. 正则表达式:name="(.+?)" value="(.+?)". 模板:$1$$2$. 不要用/ /封装正则表达式. 如下变量 ...
- [转]修改python默认的编码方式
今天碰到了 python 编码问题, 报错信息如下Traceback (most recent call last): File "ntpath.pyc", line 108, ...
- Countries
Countries 题目链接:http://hihocoder.com/problemset/problem/1391 预处理+双指针 首先将A->B,B->A的导弹全部转化为B-> ...
- jsp容易混淆的知识点
1.在使用的时候可以使用${pageContext.request.contextPath},也同时可以使用<%=request.getContextPath()%>达到同样的效果,同时, ...
- Debug / Inspect WebSocket traffic with Fiddler【转】
Introduction I have recently written a project using SignalR, which supports HTML 5 WebSocket. Howe ...
- PHP截取中文字符串方法总结
<?php @header('Content-type: text/html; charset=UTF-8'); $arr = "sa撒的发dfa多少sfd看sdf得12上24飞452 ...