Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37368 | ☩Deutschland☩ | 输出亲朋字符串 | C++ | Accepted | 0 MS | 244 KB | 240 | 2024-01-20 12:23:44 |
#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; }