题解 2850: 输出亲朋字符串

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

C语言写这题不能用scanf

摘要:解题思路:注意事项:测试的数据中有空格,使用scanf不能识别空格。要使用gets或者别的支持空格的。参考代码:```c#include<stdio.h>#include&……

输出亲朋字符串(c++)

摘要:```cpp #include using namespace std; int main(){ string s; getline(cin,s);//此函数可读取整行,包括……

2850: 输出亲朋字符串

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const int N=1e7;stri……

题解 2850: 输出亲朋字符串

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[103];int main(){ cin.getline(s,103……

要注意测试案例会包括空格

摘要:解题思路:注意事项:要用gets函数,测试数据里面有空格,%s接受不了参考代码:#include<stdio.h>#include<string.h>int main(){ char a[100]; ……

想太多了,很简单的题搞半天

摘要:解题思路:没啥思路,就循环相加就是注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){    int i,p;    char s[100]……

2850: 输出亲朋字符串 Python极简代码

摘要:解题思路:第二个ord函数,直接在内部取膜就好,就可以直接取到第一个了注意事项:111参考代码:s = input() s1 = &#39;&#39; for i in range(len(s))……

2850: 输出亲朋字符串

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[10000];int main(){    cin.getline(……