1 条题解
#include<iostream> #include<string.h> #include<algorithm> using namespace std; int main() { string a, b; getline(cin, a); for (int i = 0; i < a.length(); i++) { if (i == a.length() - 1) { b+=a[i]+a[0]; } else { b+=a[i]+a[i+1]; } } cout<<b; return 0; }
使用您的 Hydro 通用账户