文章

246

粉丝

0

获赞

1179

访问

73.7k

头像
字符串连接 题解:
P1397 华中科技大学
发布于2026年3月13日 15:56
阅读数 279

#include<iostream>
using namespace std;

string str,res;
int cnt=0;

int main()
{
    while(cin>>str)
    {
        cnt++;
        res+=str;
        if(cnt%2==0)
        {
            cout<<res<<endl;
            res="";
        }
    }
    return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发