Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
58076 | littletwleve | 输出亲朋字符串 | C++ | Accepted | 0 MS | 244 KB | 241 | 2024-12-03 19:20:08 |
#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; }