编写题解 1169: 绝对值排序 摘要:解题思路:注意事项:参考代码:while True: a = list(map(int,input().split())) if a[0]==0: break else…… 题解列表 2022年06月04日 0 点赞 0 评论 196 浏览 评分:0.0
小白随便写的,记录一下 摘要:```python def solve_sort(li): new_li = list(map(int, li[1:])) new_li.sort(key=abs, revers…… 题解列表 2024年03月24日 0 点赞 0 评论 355 浏览 评分:0.0
用冒泡排序做的,没有时间超限 摘要:解题思路:注意事项:参考代码:while True: li=list(map(int,input().split())) if li[0]==0: break else…… 题解列表 2024年03月11日 0 点赞 0 评论 138 浏览 评分:0.0
绝对值排序(python) 摘要:解题思路:注意事项:参考代码:while True: nums = list(map(int, input().split())) n = nums[0] if n == 0: …… 题解列表 2023年12月18日 0 点赞 0 评论 156 浏览 评分:0.0
1169: 绝对值排序 摘要:解题思路:注意事项:参考代码:while True: try: n = list(map(int, input().split())) a = n[1:]…… 题解列表 2024年04月08日 0 点赞 0 评论 186 浏览 评分:0.0
绝对值排序 摘要:解题思路:分别用列表来存放数据的原值和绝对值注意事项:参考代码:while True: try: L = list(map(int,input().split())) …… 题解列表 2023年03月21日 0 点赞 0 评论 172 浏览 评分:0.0
帅气的题解 摘要:解题思路:sort()函数的调用注意事项:ask()函数的掌握参考代码:while True: try:#加个try保险 a=list(map(int,input().strip(…… 题解列表 2022年12月22日 0 点赞 0 评论 146 浏览 评分:0.0
1169基础解法(Python) 摘要:注意事项:因为sys.stdin直接读取输入流,则第一项是什么对我们而言不太重要,只需要判断这个列表是否为空即可因为是绝对值的大小排序,选用sorted()函数中的key参数设定排序的指标为abs()…… 题解列表 2022年11月06日 0 点赞 0 评论 125 浏览 评分:0.0
绝对值排序 代码少 摘要:while True: try: print(' '.join(sorted(input().split()[1:],key=lambda x:abs(int(x)…… 题解列表 2022年11月02日 0 点赞 0 评论 192 浏览 评分:0.0
之前想要直接用转换 摘要:解题思路:先把大于零的排序转置小于零 的再重新弄。如果绝对值最大的负数小于最大的正数怎么办????注意事项:参考题解,千亩安前面没有想到重复执行,都没想清楚,后面的循环嵌套有点不太理解,基本上能知道,…… 题解列表 2022年05月27日 0 点赞 0 评论 200 浏览 评分:0.0