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)