找出最长的字符串来 解题思路:1、将输入的五个字符串放入一个列表2、将五个字符串的长度放入另一个列表求最值3、根据串长等于最大值输出对应的字符串注意事项:参考代码:L=[]L1=[]foriinrange(5):a=input()L1.append(a)L.append(len(a))foriinL1:iflen(i)= 题解列表 2023年01月07日 0 点赞 0 评论 603 浏览 评分:0.0
1782—————找出最长的字符串来 importjava.util.Scanner;publicclassMain{publicstaticvoidmain(String[]args){Scannerscanner=newScanner(System.in);intcount=0;String[]arr=newString[5];for 题解列表 2023年02月01日 0 点赞 0 评论 739 浏览 评分:8.0
编写题解 1782: 找出最长的字符串来(python) 摘要:解题思路:注意事项:参考代码:if __name__ == '__main__': c = '' length = 0 for i in range(…… 题解列表 2023年02月13日 0 点赞 0 评论 586 浏览 评分:0.0
新手一看就会的代码——找出最长的字符串来 解题思路:输入多个字符串用gets,长度用strlen,找出五个数中的最大值容易,怎么把对应的字符串输出呢?还是得用数组,所以用一个二维数组。注意事项:注意max要存起来,不然下次max不变。参考代码:#include#includeintmain(){chars 题解列表 2023年03月05日 0 点赞 0 评论 604 浏览 评分:6.0
1782基础解法(Python) 摘要:解题思路:一个更通用的解法注意事项:学习字典的元素添加方式和对字典进行简单排序的方法参考代码:import sysdic = {}for data in sys.stdin : dic[data…… 题解列表 2023年05月30日 0 点赞 0 评论 571 浏览 评分:0.0
找出最长的字符串来(C语言) 参考代码:```c#include#includeintmain(){charstr[5][100];intlen[5]={0};inti=0;for(;i 题解列表 2023年10月27日 0 点赞 0 评论 703 浏览 评分:0.0
找出最长的字符串来 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>void lang(char *x1,char *x2,char *x3,char *x4,char…… 题解列表 2024年03月20日 0 点赞 0 评论 473 浏览 评分:2.0
编写题解 1782: 找出最长的字符串来 摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> int main() { char strings[5][101]; /…… 题解列表 2024年04月08日 0 点赞 0 评论 655 浏览 评分:0.0
小白,看看就行,不动脑袋 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ string s, s2; …… 题解列表 2024年11月13日 0 点赞 0 评论 406 浏览 评分:0.0
比较繁琐的解法 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ int i,p=0; char a[5][1000]; i…… 题解列表 2024年12月08日 0 点赞 0 评论 447 浏览 评分:0.0