HDU 1328 IBM Minus One
IBM Minus One
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4462 Accepted Submission(s): 2337
Problem Description
After the movie was released and became very popular, there was some discussion as to what the name 'HAL' actually meant. Some thought that it might be an abbreviation for 'Heuristic ALgorithm'. But the most popular explanation is the following: if you replace every letter in the word HAL by its successor in the alphabet, you get ... IBM.
Perhaps there are even more acronyms related in this strange way! You are to write a program that may help to find this out.
Input
Print a blank line after each test case.
HAL
SWERC
Sample Output
IBM
String #2
TXFSD
Source
#include<iostream>
#include<string>
using namespace std; int main(void)
{
int n,j=;
string str; cin>>n;
while(n--)
{
cin>>str;
for(int i=;i<str.size();i++)
{
if(str[i]=='Z')
str[i] = 'A'; //注意一下就行
else
str[i] = str[i]+;
}
cout<<"String #"<<j<<endl<<str<<endl<<endl;
j++;
} return ;
}
HDU 1328 IBM Minus One的更多相关文章
- HDOJ/HDU 1328 IBM Minus One(水题一个,试试手)
Problem Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or ...
- IBM Minus One(water)
IBM Minus One Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- IBM Minus One
IBM Minus One Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total ...
- IBM Minus One 简单字符处理
IBM Minus One Time Limit: 2 Seconds Memory Limit: 65536 KB You may have heard of the book '2001 ...
- ZOJ 1240 IBM Minus One
/* You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the s ...
- ZOJ Problem Set - 1240 IBM Minus One
水题不解释,就是注意下格式,没输出一行字符串记得加一个空白行 #include <stdio.h> #include <string.h> int main() { ; ]; ...
- 转载:hdu 题目分类 (侵删)
转载:from http://blog.csdn.net/qq_28236309/article/details/47818349 基础题:1000.1001.1004.1005.1008.1012. ...
- HDU ACM-Steps
HDU ACM-Steps RECORD Chapter 1 Section 1 暖手题 1.1.1 A+B for Input-Output Practice (I) #include <st ...
- 杭电ACM分类
杭电ACM分类: 1001 整数求和 水题1002 C语言实验题——两个数比较 水题1003 1.2.3.4.5... 简单题1004 渊子赛马 排序+贪心的方法归并1005 Hero In Maze ...
随机推荐
- Hadoop: Start-all.sh 后发现JPS后Namenode没有启动
重新格式化Namenode:hadoop namenode -format 然后启动hadoop:start-all.sh 执行下JPS命令就可以看到NameNode了
- Java生成登陆时使用的图片验证码
package com.ws.frame.utils; import java.awt.Color; import java.awt.Font; import java.awt.Graphics; i ...
- Docker 生成Node.js web app(含端口映射)
1.新建目录src,并进入src目录 [xiejdm@localhost Documents]$ mkdir src [xiejdm@localhost Documents]$ cd src/ 2.创 ...
- 003 assert简述
- css基础之 font的简写规则 以及 自定义 CSS3 @font-face详细用法
Part 1 font简写 CSS的命名规则是用英文字母 数字 和下划线(一般用小写)来命名.简写css font的好处有三:一是写起来方便(就像键盘快捷键):二是简化代码:三是帮助你熟悉和深刻理解c ...
- oracle 之 COMMENT
http://blog.csdn.net/liguihan88/article/details/3002403 无疑注释现在都被大家接受和认可,在大家编程用的IDE中都提供或有第三方插件来支持提取注释 ...
- jq插件第二款来袭 图片滚动
这第二款也是非常实用的插件,也是与图片相关,关于图片的需求太多了,这个是图片滚动哦,不过不是无缝滚动,是左像右滚动,到头的话再往回滚动,利用scrollLeft实现的,支持自动滚动和每次滚动的个数默认 ...
- php isset — 检测变量是否设置 foreach循环运用
例子 $a = 336 ; $b = 33 ; function large($x,$y){ if((!isset($x))||(!isset($y))){ // echo "this fu ...
- php 函数之 )_each()list()implode()explode()in_array()
<?php /* implode() 把数组组合成字符串 explode() 把字符串分割成数组 in_array() 检测内容是否在数组中 each()把数组元素拆分成新的数组 list() ...
- 自学nodejs系列
好久没有搞nodejs了.nodejs也是更新的很快!!当初翻译的文档