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 ...
随机推荐
- nodejs实现接收Snmp的Trap消息
var assert = require('assert'); var ASN1 = { EOC: 0, Boolean: 1, Integer: 2, BitString: 3, OctetStri ...
- uglifyjs入门接触
一.背景 今天在看<锋利的jQuery>文时,突然看到Uglifyjs压缩工具,感觉值得一试(玩),所以网上稍微搜了一下资料,简单的运用了一下,发现入门非常简单,当然网上有很多在线压缩工具 ...
- Oracle 11g完全卸载(Windows)(转)
Oracle 11g完全卸载(Windows) 1.关闭oracle所有的服务.可以在windows的服务管理器中关闭: 一般有以下服务: (1)Oracle SID VSS Writer ...
- IT技术论坛
http://www.v2ex.com/ http://www.dewen.org/ http://stackoverflow.com/ http://segmentfault.com/ 博客园
- HDU 5724 - Chess
题意: 一个n行20列的棋盘. 每一行有若干个棋子. 两人轮流操作, 每人每次可以将一个棋子向右移动一个位置, 如果它右边有一个棋子, 就跳过这个棋子, 如果有若干个棋子, 就将这若干个 ...
- BZOJ 3368 约翰看山(扫描)O(N)
这题,简直丧心病狂了. 大意是给你一个环上一些覆盖的区间,让你求总覆盖长度. 非常坑的点是这个区间因为是个环,所以可能逆时针给你,也可能顺时针给你,你特别要注意.那么区分顺时针和逆时针的方法 就是,题 ...
- L - 辗转相除法(第二季水)
Description The least common multiple (LCM) of a set of positive integers is the smallest positive i ...
- [Effective Modern C++] Item 5. Prefer auto to explicit type declarations - 相对显式类型声明,更倾向使用auto
条款5 相对显式类型声明,更倾向使用auto 基础知识 auto能大大方便变量的定义,可以表示仅由编译器知道的类型. template<typename It> void dwim(It ...
- mac git 命令提示
直接进入正题: $ brew list 查看你是否已经安装了"bash-completion",如果没有,继续往下看: $ brew install bash-completion ...
- SQL Server 备份的 8 种方法。
方法 1. 完整备份 方法 2. 差异备份 方法 3. 部分备份(备份数据库的read_write部分) 方法 4. 文件备份 方法 5. 文件组备份 方法 6. 只复制备份 方法 7. 日志备份 - ...