알고리즘

[알고리즘] 백준 6321 - IBM 빼기 1 (C++)

blueberrysoda 2025. 2. 2. 23:57

[문제 링크] : https://www.acmicpc.net/problem/6321

#include <iostream>
using namespace std;

int main(){
    int T;
    string S;

    cin >> T;

    for(int i=1; i<=T; i++){
        cin >> S;
        cout << "String #" << i << "\n";
        for(int j=0; j<S.length(); j++){
            cout << (char)((S[j] - 'A' + 1) % 26 + 'A');
        }
        cout << "\n\n";
    }

    return 0;
}