1 条题解

  • 0
    @ 2025-2-14 20:50:09

    C++ :

    #include<bits/stdc++.h>
    using namespace std; 
    int main() {  
        string q;  
        getline(cin, q);  
        
        string w;   
    
        for (char c : q) {  
            if (c >= 'a' && c <= 'y') {  
                w += c + 1; 
            } else if (c == 'z') {  
                w += 'a';  
            } else if (c >= 'A' && c <= 'Y') {  
                w+= c + 1; 
            } else if (c == 'Z') {  
                w += 'A'; 
            } else {  
                w += c;  
            }  
        }  
    
        cout << w <<endl; 
        return 0;  
    }
    
    • 1

    信息

    ID
    463
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者