9 条题解
-
5lichengjun LV 10 @ 2023-4-19 19:30:55
对不起,我有反骨。a.append(b);和a+=b这种行为都是拼接字符串
反骨法:
#include<iostream> #include<string.h> using namespace std; string a,b; int main(){ while(cin>>a>>b){ a.append(b); cout<<a<<"\n"; } return 0; }
正常做法:
#include<iostream> using namespace std; string a,b; int main(){ while(cin>>a>>b)cout<<a<<b<<"\n"; return 0; }
-
32023-9-17 20:32:57@
#include <iostream> #include <bits/stdc++.h> using namespace std; const int N=1e2+10; const int INF=0x3f3f3f3f; int main() { char a[N],b[N]; while(cin>>a>>b) { cout<<a<<b ; } }
唯一对题解
其他A不了(加了endl)
-
22023-5-23 22:18:37@
#include<bits/stdc++.h> using namespace std; const int N=1e2+10; char a[N],b[N];
int main(){ while(cin>>a>>b){ cout <<strcat(a,b)<<endl; }
return 0;
}
-
22022-2-19 11:04:15@
#include <stdio.h> #include <iostream> #include <string.h> const int N = 2e5 + 10; using namespace std; int main() { string a,b; while(cin >> a >> b) cout << a << b << endl; }
-
12024-12-1 15:12:42@
#include<iostream> using namespace std; string a,b; int main(){ while(cin>>a>>b)cout<<a<<b; return 0; }
-
12023-5-19 19:17:10@
#include <iostream> #include <bits/stdc++.h> using namespace std; const int N=1e2+10; const int INF=0x3f3f3f3f; int main() { char a[N],b[N]; while(cin>>a>>b) { cout<<a<<b<<endl; } }
-
12023-5-17 22:00:22@
#include <stdio.h> #include <string.h> #include <queue> #include <math.h> #include <vector> #include <algorithm> #include <iomanip> #include <stack> #include <cstring> #include <bits/stdc++.h> #include <algorithm> using namespace std; char a[110],b[110]; int main(){ while(cin >> a >> b){ cout << strcat(a,b) << endl; } return 0; }
-
12022-2-19 11:06:06@
#include <stdio.h> #include <iostream> #include <string.h> using namespace std; int main() { string a,b; while(cin>>a>>b) cout<<a<<b<<endl; }
-
12022-2-19 11:05:34@
#include <stdio.h> #include <iostream> #include <string.h> const int N = 2e5 + 10; using namespace std; int main() { string a,b; while(cin >> a >> b) cout << a << b <<endl; return 0; }
- 1
信息
- ID
- 1163
- 时间
- 1000ms
- 内存
- 32MiB
- 难度
- 6
- 标签
- 递交数
- 732
- 已通过
- 206
- 上传者