首页
DreamJudge
院校信息
考研初试
考研复试
保研专区
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
太一
2026年3月20日 19:32
字符串连接 题解:
P1397
回复 0
|
赞 4
|
浏览 249
#include<iostream> #include<cmath> #include<algorithm> #include<string> #include<map> using namespace std; int main() { string a, b; while (cin >> a >> b) { cout << a + b << endl; } return 0; }
mlx
2026年3月13日 15:56
字符串连接 题解:
P1397
回复 0
|
赞 7
|
浏览 274
#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; }...
liux662
2026年3月4日 22:41
字符串连接 难绷做法题解:
P1397
回复 1
|
赞 1
|
浏览 347
#include<bits/stdc++.h> using namespace std; int main() { string a,b; while(cin>>a>>b) cout<<a<<b<<"\n"; }
曾不会
2026年1月31日 19:01
字符串连接 题解:
P1397
回复 0
|
赞 0
|
浏览 341
s=list(map(str,input().split())) for i in s: print(i,end='')
boomb
2025年2月28日 16:14
P1397 字符串连接 答疑提问:
P1397
回复 4
|
赞 4
|
浏览 1.3k
本地ide运行没问题,提交显示Output Limit Exceeded #include<stdio.h> #include<stdlib.h> int main(){ char a[105],b[105]; char *q,*p; while(scanf("%s%s",a,b)!=NULL){ char *m; int sum1=0,sum2=0; p=a;q=b; for(int i=0;*(p+i)!='\0';i++) sum1++; for(int j=0;*(q+j)!='\0';j+...
泛泛之交
2024年3月24日 14:21
字符串连接 题解:
P1397
回复 0
|
赞 15
|
浏览 1.7k
#include <bits/stdc++.h> using namespace std; int main() { char s[101]; string a; while(cin>>s){ int len=strlen(s); for(int i=0;i<len;...
小酒
2024年3月15日 15:35
字符串连接 题解:
P1397
回复 0
|
赞 3
|
浏览 1.3k
1397解题思路 #include <bits/stdc++.h> using namespace std; int main() { char a[300]={0}; while(gets(a)){ int k=0,i=0,count=0; while(a[i++]!='\0') { count++; } for(i=0;i<count;i++) { if(a[i]==' ') { a[i]=a[i+1]; k++;...
小王桐学
2024年2月28日 22:43
字符串连接 题解:C
P1397
回复 0
|
赞 4
|
浏览 1.5k
#include <stdio.h> #include <string.h> int main() { char s1[200],s2[100],*p,*q; while(scanf("%s",s1) != EOF) { scanf("%s",s2); p = s1; q = s2; while(*p != '\0') p++; while(*q != '\0') { *p = *q; p++; q++; } *p = '\0'; printf("%s\n",...
蟹蟹
2023年7月3日 22:22
字符串连接 题解:
P1397
回复 0
|
赞 7
|
浏览 1.7k
#include<stdio.h> #include<string.h> int main() { char arr1[100],arr2[100]; scanf("%s",arr1); // getchar(); //获取第一个子字符串后的空格 scanf("%s",arr2); printf("%s",arr1); pr...
题目
字符串连接
题解数量
9
发布题解
在线答疑
热门题解
1
字符串连接 题解:
2
字符串连接 题解:
3
字符串连接 题解:
4
字符串连接 题解:
5
字符串连接 题解:C
6
P1397 字符串连接 答疑提问:
7
字符串连接 题解:
8
字符串连接 难绷做法题解:
9
字符串连接 题解: