提交时间:2024-12-12 17:15:29

运行 ID: 58567

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