蓝桥杯算法训练VIP-最长字符串-题解(Python代码) 利用python很方便,,,,先放到列表,再按条件排序,输出最大的值。```pythonl=[xforxininput().strip().split()]print(sorted(l,key=lambdax:len(x))[-1])``` 题解列表 2020年02月14日 0 点赞 0 评论 1004 浏览 评分:8.0
python解出来了 摘要:解题思路:注意事项:参考代码:ls=[]ls = list(input().strip().split())z = len(ls[0])b = 0for i in ls: if len(i) >…… 题解列表 2021年04月17日 0 点赞 0 评论 621 浏览 评分:0.0
比较繁琐的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,j,p=0; char a[150],b[150],…… 题解列表 2024年12月08日 0 点赞 0 评论 414 浏览 评分:0.0
最长字符串 (C语言代码) 摘要:#include<stdio.h>int len(char *arr){ int i=0; for(;arr[i]!='\0';i++); return i;}int main(){ …… 题解列表 2017年12月07日 0 点赞 0 评论 1878 浏览 评分:0.0
结构体数组解决(c语言代码) ```c#include#include#defineMAX101typedefstruct{//定义一个结构体chars[MAX];//字符数组,用于存储字符串intlength;//整数,存储字符串的长度}Arr;intmain(){Arrstr[MAX];//定义一个Arr类型的数组, 题解列表 2024年08月23日 0 点赞 0 评论 556 浏览 评分:0.0
1644: 蓝桥杯算法训练VIP-最长字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;int main(){ string m…… 题解列表 2024年07月13日 0 点赞 0 评论 491 浏览 评分:0.0
蓝桥杯算法训练VIP-最长字符串-题解(Java代码) ```javaimportjava.util.Scanner;publicclass测试{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);String[]a=newString[5];intmax=0;fo 题解列表 2021年01月17日 0 点赞 0 评论 640 浏览 评分:0.0
1644: 蓝桥杯算法训练VIP-最长字符串 ```cpp#includeusingnamespacestd;typedeflonglongll;intmain(){stringmaxxstr;llmaxx=0;for(inti=1;i>s;if(s.size()>maxx){maxx=s.size();maxxstr=s;}}cout 题解列表 2024年07月13日 0 点赞 0 评论 435 浏览 评分:0.0
题解 1644: 蓝桥杯算法训练VIP-最长字符串 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int maxx1=0; string maxx; for…… 题解列表 2024年07月13日 0 点赞 0 评论 538 浏览 评分:0.0
无聊的星期六 摘要:z=input() z=z.split() max=0 for i in range(len(z)): if len(z[max])<len(z[i]): max=i…… 题解列表 2024年04月14日 0 点赞 0 评论 589 浏览 评分:0.0