首页
DreamJudge
院校信息
考研初试
机试真题
讨论区
兑换中心
登录
注册
上岸
以下题解仅供学习参考使用。
抄袭、复制题解,以达到刷AC率/AC数量或其他目的的行为,在N诺是严格禁止的。
N诺非常重视学术诚信。此类行为将会导致您成为作弊者。具体细则请查看N诺社区规则。
boomb
2025年2月28日 16:14
P1397 字符串连接 答疑提问:
P1397
回复 4
|
赞 4
|
浏览 445
本地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
|
赞 4
|
浏览 896
#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
|
赞 2
|
浏览 741
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
|
赞 3
|
浏览 900
#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
|
赞 3
|
浏览 1.0k
#include<stdio.h> #include<string.h> int main() { char arr1[100],arr2[100]; scanf("%s",arr1); // getchar(); //获取第一个子字符串后的空格 scanf("%s",arr2); printf("%s",arr1); pr...
题目
字符串连接
题解数量
5
发布题解
在线答疑
热门题解
1
字符串连接 题解:
2
P1397 字符串连接 答疑提问:
3
字符串连接 题解:C
4
字符串连接 题解:
5
字符串连接 题解: