提交时间:2026-04-17 15:13:15

运行 ID: 87418

#include <iostream> #include <string> using namespace std; int main() { string s; cin>>s; string rest; int n=s.size(); for (int i=0;i<n;i++) { int a=s[i]; int b; if (i==n-1) { b=s[0]; } else { b=s[i+1]; } rest+=char(a+b); } cout<<rest<<endl; }