提交时间:2024-12-03 19:20:08
运行 ID: 58076
#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; }