ZOJ_1240_IBM Minus One

杭州电子科技大学单片机期末试卷 杭电期末试卷 期末试卷 期末试卷 期末试卷 立即下载
IBM Minus One

Time Limit: 2 Seconds      Memory Limit: 65536 KB

You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The crew is put into stasis for the long flight, only two men are awake, and the ship is controlled by the intelligent computer HAL. But during the flight HAL is acting more and more strangely, and even starts to kill the crew on board. We don't tell you how the story ends, in case you want to read the book for yourself :-)

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

The input starts with the integer n on a line by itself - this is the number of strings to follow. The following n lines each contain one string of at most 50 upper-case letters.


Output

For each string in the input, first output the number of the string, as shown in the sample output. The print the string start is derived from the input string by replacing every time by the following letter in the alphabet, and replacing 'Z' by 'A'.

Print a blank line after each test case.


Sample Input

2
HAL
SWERC


Sample Output

String #1
IBM

String #2
TXFSD



题意和思路:什么叫做简单题???这个就是。。。难道一次就AC的题目.一个字符串每个字符都用后面的字符替代

Sample Program Here
/******************************************
**
**      Author: Wan KaiMing
**      Date:   2012-10-31-19.40
**
*******************************************/


#include<iostream>
#include<string>
#include<iomanip>
using namespace std;
int main(){
   int n;//表示牌的数量
   double s=0;//表示超出桌沿的距离
   cout<<"# Cards  Overhang\n";
   while(cin>>n){
     s=0;
     for(int i=1;i<=n;i++) s+=1.0/(2*i);
     cout<<setw(5)<<n
         <<setw(10)<<fixed<<setprecision(3)<<s<<endl;
   }

   return 0;
}


杭州电子科技大学acm代码 You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The crew is put into stasis for the long flight, only two men are awake, and the ship is controlled by the intelligent computer HAL. But during the flight HAL is acting more and more strangely, and even starts to kill the crew on board. We don't tell you how the story ends, in case you want to read the book for yourself :-) 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. 立即下载

相关推荐

MTK平台高效部署Qwen2.5大模型:从转换到推理全流程解析

本文详细解析了在联发科(MTK)NeuroPilot平台上高效部署Qwen2.5大模型的全流程。内容涵盖从环境搭建、模型转换、量化优化到编译部署与上机推理的完整步骤,重点分享了模型转换与模型运行的关键实践与避坑指南,旨在帮助开发者将大语言模型成功集成至移动及边缘设备。

zeta9的博客 378

ACM书中的题目 j-10

J-10题目: J - 10 Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu SubmitStatus Description You may have heard of the book ‘2001 - A Space Odyssey’ by Arthur C. Clarke, or t

tsiac的博客 410

3GPP协议解读_NTN系列(一)_38.811_非地面网络(NTN)的背景、应用场景和信道建模

非地面网络覆盖广,对物理攻击和自然灾害有一定的抵抗性。本文根据3GPP协议对NTN网络的背景、应用场景和信道模型进行了整理。

JCMLSY的博客 4928

《ACM程序设计》书中题目 J-10 2001 - A Space Odyssey

Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The cre

G_Meteor的博客 658

Python爬虫实战:逆向解析央视频加密参数(附完整代码)

本文详细解析了央视频加密体系的技术实现,通过Python逆向工程实战演示如何解密动态密钥、AES加密和自定义哈希算法等核心组件。文章提供完整代码示例,涵盖GUID生成、参数构造和异步请求处理,帮助开发者掌握现代视频平台的反爬机制破解方法。

weixin_42532473的博客 1131

PDN设计

作者:AirCity 2020.2.6 Aircity007@sina.com 本文所有权归作者Aircity所有 PDN设计的目的是降低电源纹波水平,减小电压跌落。我们通常要求LDO的文波水平是30mV,DCDC是50mV,超过这个就需要PDN设计。 PDN设计的方法是用不同的容值,合适的总电容量,降低电源平面与地平面之间的交流阻抗,确定容值总量和电容大小的过程,就是PDN设计过程。 为什么需...

AirCity123的博客 4147

ZOJ 1240 IBM Minus One

IBM Minus One Time Limit: 2 Seconds      Memory Limit: 65536 KB You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In i

胖子加油! 341

多模态论文笔记——CogVLM和CogVLM2

本文详细介绍LoRA版本的多模态模型——CogVLM和CogVLM2。在SD3中使用其作为captioner基准模型的原因和优势。

haopinglianlian的博客 2205

IBM Minus One

IBM Minus One Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley

441

23、电生理与CSD分析:探索大脑活动的前沿技术

本文介绍了电生理与电流源密度(CSD)分析在探索大脑活动中的前沿应用。从电生理技术的发展现状,到局部场电位(LFPs)的起源与解释,重点阐述了CSD分析的原理、实验方法及其在绘制皮层兴奋流、解析突触输入和研究自发振荡中的广泛应用。文章还总结了该领域的优势与挑战,并展望了技术改进、多模态融合、数据分析创新及临床拓展的未来方向,展示了这些技术在揭示大脑功能机制中的关键作用。

Apple的专栏 121

手把手教你学Simulink——基础储能管理场景实例:基于Simulink的压缩空气储能(CAES)系统简化模型仿真

本文介绍了基于Simulink的压缩空气储能(CAES)系统简化模型仿真方法。CAES作为大规模长时储能方案,相比锂电池具有成本低、寿命长等优势。文章详细讲解了AA-CAES系统组成、热力学建模理论,以及Simulink实现流程,包括储气室、压缩机、膨胀机等核心模块的建模方法。通过8小时充电(50MW)和6小时放电(40MW)的仿真,验证了系统可实现60%往返效率。该模型为理解CAES系统运行机制提供了实用工具,并指出热管理、储气室特性等工程实践要点,为新型电力系统储能规划提供了仿真基础。

MHD0815的博客 171

《ACM程序设计》书中题目―J

Description You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In it a spaceship is sent from Earth to Saturn. The crew is p

的博客 308

SAP Business Technology Platform 支持的技术栈

SAP Business Technology Platform(简称 BTP)是 SAP 提供的一个综合技术平台,旨在帮助企业实现业务转型和创新。BTP 融合了数据库管理、应用开发、集成、分析和智能技术,为企业提供从基础架构到端到端应用的全面服务。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 1567

ZOJ1240 IBM Minus One

#include<string> #include<iostream> #include<unordered_map> #include<algorithm> using namespace std; int main(){ int n; cin >> n; for(int i = 1; i <= n; i++){ ...

姚军 177

ET2012新版免狗免安装绿色软件

ET2012新版免狗免安祖昂绿色软件。,新界面,新视觉,

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

ZOJ 1240: IBM Minus One

这题就是直白的ROT(+1)编码问题 A->B, C->D, Y->Z, Z->A 数据量也不大 难度系数=0 通过率数据:39.29% (6712/17080) import java.util.*; public class Main { public static void main(String[] args) { Scanner in =

业余程序员_专业吃货 738

最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版

Part-E1-SDIO-Specification-Ver4.00-Final-120220.pdf:最新的sdio 4.0 spec 协议标准 带书签 高清完整PDF版,包括SDIO 接口的外设,SDIO 接口官方协议等。

ZOJ Problem Set - 1240 IBM Minus One

IBM Minus One Time Limit: 2 Seconds      Memory Limit: 65536 KB You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In i

acm_1361677193的专栏 410

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

HDU1328 ZOJ1240 IBM Minus One【水题】

IBM Minus One Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9704 Accepted Submission(s): 4643 Problem Description You may have heard of the book ‘2001 - A Space Odyssey’ by Arthur C. Clarke, or

海岛Blog 535

zoj 1240 IBM Minus One

IBM Minus One Time Limit: 2 Seconds      Memory Limit: 65536 KB You may have heard of the book '2001 - A Space Odyssey' by Arthur C. Clarke, or the film of the same name by Stanley Kubrick. In i

学学学,敲敲敲 373

zoj 1240.IBM Minus One

IBM Minus One #include #include #include using namespace std; int main(int argc, char* argv[]) { //ifstream cin("aaa.txt"); int n; string s; cin>>n; for(int i=0;i<n;i++) { cin>

da_fan_shu_的专栏 403

ZOJ Problem Set - 1240 IBM Minus One

#include using namespace std; int main() { int n; cin>>n; string s; for (int i = 0; i < n; i++) { cin>>s; cout<<"String #"<<i+1<<endl; for (int j = 0; j < s.size(); j++) { if (s[j] !

进击的Nico 385
上一篇: ZOJ_1216_Deck
下一篇: Insertion_Sort(插入排序)
wankaiming
博客等级 码龄15年 49粉丝 27原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值