2850: 输出亲朋字符串 ```#includeusingnamespacestd;constintN=100010;intmain(){stringa,b;getline(cin,a);for(inti=0;i+1 题解列表 2023年12月19日 0 点赞 0 评论 374 浏览 评分:9.9
2850: 输出亲朋字符串 Python极简代码 摘要:解题思路:第二个ord函数,直接在内部取膜就好,就可以直接取到第一个了注意事项:111参考代码:s = input() s1 = '' for i in range(len(s))…… 题解列表 2023年12月05日 0 点赞 2 评论 712 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;char s[10000];int main(){ cin.getline(…… 题解列表 2023年11月04日 0 点赞 0 评论 588 浏览 评分:9.9
亲朋字符串(涉及到一个转换的问题) 摘要:问: int asciiSum=currentChar+nextChar;为什么是int类型而不是char类型,毕竟current和next都是char类型的啊?答:这是一个很好的…… 题解列表 2023年11月02日 1 点赞 0 评论 763 浏览 评分:9.9
2850: 输出亲朋字符串 摘要:参考代码:#include <bits/stdc++.h> using namespace std; char str2[300]; int tong[150]; int main() { …… 题解列表 2023年10月14日 0 点赞 0 评论 594 浏览 评分:9.9
ASCII值赋值之输出亲朋字符串 ```c#include#includeintmain(){chara[101],b[101];//因为字符串长度最大为100,101是因为字符串最后一位是\0gets(a);//VisualStudio22版本要用gets_s(a)函数,这里的编译器就用gets(a)intsize=strlen(a 题解列表 2023年01月21日 0 点赞 0 评论 986 浏览 评分:9.9
2850: 输出亲朋字符串 ```cpp#includeusingnamespacestd;intmain(){strings;getline(cin,s);chara=s[0];intl=s.size();for(inti=0;i 题解列表 2023年01月10日 0 点赞 0 评论 556 浏览 评分:9.9
编写题解 2850: 输出亲朋字符串 摘要:解题思路:设计两个移动指针count1,count2注意事项:参考代码:str=input() ls=[] #初始化空列表 count1=0 #设计两个相邻指针并初始化 count2=1 wh…… 题解列表 2022年10月28日 0 点赞 1 评论 1190 浏览 评分:9.9
C语言写这题不能用scanf 摘要:解题思路:注意事项:测试的数据中有空格,使用scanf不能识别空格。要使用gets或者别的支持空格的。参考代码:```c#include<stdio.h>#include&…… 题解列表 2025年08月02日 3 点赞 0 评论 431 浏览 评分:10.0
c语言 输出亲朋字符串 (运用scanf输入空格的例子) 解题思路:运用%x[^\n]来输入空格,x为文本长度注意事项:测试中包含输入空格参考代码:#include#includeintmain(void){chara[100]={};scanf("%100[^\n]", 题解列表 2025年10月09日 0 点赞 0 评论 528 浏览 评分:10.0