1 solutions

  • 0
    @ 2026-11-14 11:34:12

    C++ :

    #include <bits/stdc++.h>
    using namespace std;
    
    int main(){
        string s1,s2,s3;
        cin >> s1 >> s2 >> s3;
        int d = s2[0] - s1[0];
        
        for (int i = 0;i<s3.size();i++){
            s3[i] -= d;
            if (s3[i] <'A') s3[i] +=26;
        }
        cout << s3;
        return 0;
    }
    
    • 1

    Information

    ID
    135
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    10
    Tags
    # Submissions
    10
    Accepted
    3
    Uploaded By