解最长字符串 摘要:解题思路:注意事项:参考代码:a=input()m=a.split()max=0maxi=0for i in range(0,len(m)): if max<len(m[i]): …… 题解列表 2021年12月26日 0 点赞 0 评论 527 浏览 评分:9.9
蓝桥杯算法训练VIP-最长字符串 (C++代码)只做最简单的思路! ```cpp#includeusingnamespacestd;intmain(){strings[5];intlen=0,p=0;for(inti=0;i>s[i];if(len 题解列表 2020年02月19日 0 点赞 0 评论 1153 浏览 评分:9.9
蓝桥杯算法训练VIP-最长字符串-题解(Python代码) ```pythonwhileTrue:try:a=input().split()max_num=0max_str=""forcountinrange(5):iflen(a[count])>max_num:max_num=len(a[count])max_str=a[count]print(max_st 题解列表 2020年02月07日 0 点赞 0 评论 1429 浏览 评分:9.9
蓝桥杯算法训练VIP-最长字符串-题解(C语言代码)AC代码 值得参考 #include#include#defineN5intmain(){inti,j,k;charx[N][200],ans[200];for(i=0;i 题解列表 2019年11月24日 0 点赞 0 评论 1593 浏览 评分:9.9
1644:最长字符串(使用结构体存储,扩展解法) ```cpp#include#include#includeusingnamespacestd;structword{stringw;intsize;};intmain(){wordwords[50];//声明一个包含50个word结构体的数组stringstr;getline(cin, 题解列表 2024年10月04日 0 点赞 0 评论 479 浏览 评分:9.9
python最长字符串 带解析 s=list(input().split())#以列表方式存储Max=len(s[0])#记录字符串最大长度首先记录第一个n=[]#记录字符串最大长度对应字符的下标n.append(0)#首先记录第一个foriinrange(1,len(s)):ifMax 题解列表 2023年02月19日 0 点赞 0 评论 590 浏览 评分:9.9 蓝桥杯算法训练VIP-最长字符串 (C语言代码) 摘要:解题思路:输入一个单词判断一次当前所输入的字符串和储存的最长的大小注意事项:getchar()函数放置的位置参考代码:#include<stdio.h> #include<string.h> in…… 题解列表 2019年03月20日 0 点赞 0 评论 1406 浏览 评分:9.9 最长字符串(c语言代码 简单易理解 有详细注释) ```c#include#includeintmain(){charstr[500]={0};//用来存放输入的字符串gets(str);inti=1;char*pstr[6];pstr[0]=strtok(str,"");//用来分解输入的字符串while(*(pstr+i-1))//strtok结 题解列表 2023年04月21日 0 点赞 0 评论 771 浏览 评分:9.9 蓝桥杯算法训练VIP-最长字符串-题解(C语言代码) 摘要:#include<stdio.h>#include<string.h>int main(){ char a[1000]; int n,i,j,max=0,count=0; gets(a); n=str…… 题解列表 2020年12月07日 0 点赞 0 评论 1056 浏览 评分:8.7 可AC 摘要:解题思路: 注意事项: 参考代码: #include<stdio.h> #include<string.h> int main() { int num[5], i, max =…… 题解列表 2018年07月29日 1 点赞 0 评论 1971 浏览 评分:8.5 « 1234567 »
蓝桥杯算法训练VIP-最长字符串 (C语言代码) 摘要:解题思路:输入一个单词判断一次当前所输入的字符串和储存的最长的大小注意事项:getchar()函数放置的位置参考代码:#include<stdio.h> #include<string.h> in…… 题解列表 2019年03月20日 0 点赞 0 评论 1406 浏览 评分:9.9
最长字符串(c语言代码 简单易理解 有详细注释) ```c#include#includeintmain(){charstr[500]={0};//用来存放输入的字符串gets(str);inti=1;char*pstr[6];pstr[0]=strtok(str,"");//用来分解输入的字符串while(*(pstr+i-1))//strtok结 题解列表 2023年04月21日 0 点赞 0 评论 771 浏览 评分:9.9
蓝桥杯算法训练VIP-最长字符串-题解(C语言代码) 摘要:#include<stdio.h>#include<string.h>int main(){ char a[1000]; int n,i,j,max=0,count=0; gets(a); n=str…… 题解列表 2020年12月07日 0 点赞 0 评论 1056 浏览 评分:8.7
可AC 摘要:解题思路: 注意事项: 参考代码: #include<stdio.h> #include<string.h> int main() { int num[5], i, max =…… 题解列表 2018年07月29日 1 点赞 0 评论 1971 浏览 评分:8.5