5 条题解

  • 0
    @ 2024-5-18 16:37:36

    #include<bits/stdc++.h> using namespace std; int main(){ char a[105],b[105]; cin>>a; int len=strlen(a); for(int i=0;i<len-1;i++){ b[i]=a[i]+a[i+1]; } b[len-1]=a[len-1]+a[0]; for(int i=0;i<len;i++){ cout<<b[i]; } }

    • 0
      @ 2024-3-17 14:39:40
      #include<bits/stdc++.h>
      using namespace std;
      string str;
      int main()
      {
      	ios::sync_with_stdio(false);
      	cin.tie(0);
      	cout.tie(0);
      	cin>>str;
      	int len=str.size();
      	for(int i=0;i<len-1;i++)
      	{
      		cout<<(char)(str[i]+str[i+1]);
      	}
      	cout<<(char)(str[len-1]+str[0]);
      	return 0;
      }
      
      
      
      • 0
        @ 2024-3-17 14:37:26
        • 0
          @ 2023-1-4 12:06:12
          #include<bits/stdc++.h>
          using namespace std;
          string str;
          int main()
          {
          	ios::sync_with_stdio(false);
          	cin.tie(0);
          	cout.tie(0);
          	cin>>str;
          	int len=str.size();
          	for(int i=0;i<len-1;i++)
          	{
          		cout<<(char)(str[i]+str[i+1]);
          	}
          	cout<<(char)(str[len-1]+str[0]);
          	return 0;
          }
          
          • -1
            @ 2024-6-1 19:12:20
            #include<bits/stdc++.h>
            using namespace std;
            int main(){
            	string a;
            	cin>>a;
            	int x=a.size();
            	for(int i=0;i<x;i++){
            		if(i==x-1){
            			cout<<char(a[i]+a[0]);
            			return 0;
            		}
            		cout<<char(a[i]+a[i+1]);
            	}
            
            	return 0;
            }
            //钟鼎皓~%?…,# *'☆&℃$︿★?
            
            • 1

            信息

            ID
            1132
            时间
            1000ms
            内存
            128MiB
            难度
            3
            标签
            递交数
            168
            已通过
            95
            上传者