简单易于理解的整数处理问题——Python 摘要:a=list(map(int,input().split()))m1=max(a)m2=min(a)b=a.index(m1)c=a.index(m2)a[b]=a[-1]a[…… 题解列表 2025年01月14日 0 点赞 0 评论 208 浏览 评分:0.0
自定义函数之整数处理 摘要:解题思路:注意事项:先交换大的,再交换小的。参考代码:arr = list(map(int, input().split())) max_number = max(arr) min_number …… 题解列表 2024年04月18日 0 点赞 0 评论 622 浏览 评分:0.0
[编程入门]自定义函数之整数处理 摘要:参考代码:def fun_1(ls): # 输入10个数 ls = list(map(int, input().split())) return lsdef fun_2(ls): # …… 题解列表 2021年04月07日 0 点赞 0 评论 236 浏览 评分:0.0
自定义函数之整数处理 摘要:解题思路:a,b=b,a 实现互换注意事项:参考代码:a = list(map(int,input().strip().split()))a=list(a)b=a.index(min(a))a[0]…… 题解列表 2022年11月10日 0 点赞 0 评论 113 浏览 评分:0.0
自定义函数之整数处理 摘要:解题思路:注意事项:参考代码:def input_(): a=list(map(int,input().split())) deal(a)def deal(x): x.sort() …… 题解列表 2021年11月12日 0 点赞 0 评论 203 浏览 评分:0.0
知道了怎么索引列表元素的下标 摘要:解题思路:注意事项:gan开始写的之前写过的选择排序的算法,和题目要求不同 ,这题学会了用列表点index索引列表的下标,学会互换位置,找到最大和最小值,和队首和队尾的互换位置挺好的还会用简洁的写法很…… 题解列表 2022年05月12日 0 点赞 0 评论 188 浏览 评分:0.0
1045: [编程入门]自定义函数之整数处理 摘要:解题思路:注意事项:参考代码:ls=list(map(int,input().split())) ls[ls.index(min(ls))],ls[0] = ls[0],ls[ls.index(mi…… 题解列表 2022年01月14日 0 点赞 0 评论 144 浏览 评分:0.0
感觉自己倒巧了,应该不是用这几个函数硬整出来的 摘要:解题思路:先用max(list1)求列表最大值,然后list1.index(max(list1))找出它的索引,然后才找打了list[最大值]和list[最小值]注意事项:参考代码:list1 = l…… 题解列表 2022年04月14日 0 点赞 0 评论 267 浏览 评分:0.0
无聊的星期六 摘要:n=list(map(int,input().split())) tmp=n[n.index(max(n))] n[n.index(max(n))]=n[9] n[9]=tmp tmp=n[n…… 题解列表 2024年05月25日 1 点赞 0 评论 376 浏览 评分:2.0
[编程入门]自定义函数之整数处理-题解(Python代码) 摘要:```python def shuru(): ak=list(map(int,input().split())) chuli(ak) def chuli(ak): …… 题解列表 2020年02月07日 0 点赞 0 评论 699 浏览 评分:6.0