top1编程
← 返回题目
题解

【入门】电报文字

1 条题解

  • 0
    @ 2026-7-28 22:09:58
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        string a;
        getline(cin , a);
        for(int i = 0;i < a.size();i++)
        {
        	if(islower(a[i]))
        	{
        		if(a[i] == 'z')
        		{
        			a[i] = 'a';
    			}
    			else
    			{
        			a[i] = a[i] + 1;
        		}
    		}
    	}
    	cout << a;
        return 0;
    }
    
    • 1