ZOJ_1240

#include <cstdlib> #include <iostream> using namespace std; int main(int argc, char *argv[]) { int caseCount; cin >> caseCount; int index = 1; while(caseCount-- > 0) { string inputStr; cin >> inputStr; int size = inputStr.size(); for(int i=0; i<size; i++) inputStr[i] = (inputStr[i] == 'Z') ? 'A' : (inputStr[i] + 1); cout << "String #" << index++ << endl << inputStr << endl << endl; } return EXIT_SUCCESS; }  

你可能感兴趣的:(ZOJ_1240)