IBM minus one (water)

Source: Internet
Author: User

IBM minus One

Time limit:2000/1000 MS (java/others) Memory limit:65536/32768 K (java/others)
Total submission (s): 4475 Accepted Submission (s): 2349


Problem descriptionyou may be heard of the book ' 2001-a Space Odyssey ' by Arthur C. Clarke, or the film of the same NA Me by Stanley Kubrick. In it a spaceship are sent from Earth to Saturn. The crew is put to stasis for the long flight, with only the "men" is awake, and the "ship is" controlled by the intelligent com Puter HAL. But during the flight HAL was acting more and more strangely, and even starts to kill the crew on board. We don ' t tell you how the stories ends, in case you want to read the book for yourself:-)

After the movie was released and became very popular, there is some discussion as to what the name ' HAL ' actually meant. Some thought that it might is a abbreviation for ' heuristic algorithm '. But the most popular explanation are the following:if you replace every letter in the word HAL by their successor in the ALP Habet, you get ... Ibm.

Perhaps there is even more acronyms related in this strange way! You is to write a program, which may help to find the out.

Inputthe input starts with the integer n in a line by Itself-this are the number of strings to follow. The following n lines each contain one string of of at most upper-case letters.

Outputfor 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 T, and replacing ' Z ' by ' A '.

Print a blank line after each test case. blank line after each output =_=

Sample Input2halswerc Sample outputstring #1IBM String #2TXFSD
1#include <iostream>2#include <cstdio>3#include <cstring>4 using namespacestd;5 intMain ()6 {7     intI,n;8     //freopen ("In.txt", "R", stdin);9Cin>>N;Ten GetChar (); One      for(i=1; i<=n;i++) A     { -         Chara[Wuyi]; -         intlen,j; the gets (a); -len=strlen (a); -          for(j=0; j<len;j++) -         { +             if(a[j]=='Z') -a[j]='A'; +             Else Aa[j]++; at         } -cout<<"String #"<<i<<endl<<a<<endl<<Endl; -     } -}

IBM minus one (water)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.