提交时间:2024-01-20 12:23:44

运行 ID: 37368

#include<bits/stdc++.h> using namespace std; int main(){ string s,s1; getline(cin,s); for(int i=0;i<=s.size()-1;i++){ if(i==s.size()-1){ s1+=s[i]+s[0]; }else{ s1+=s[i]+s[i+1]; } } cout<<s1<<endl; return 0; }