【Python】如何一行解决这道题 摘要:解题思路:普通的思路注意事项:没什么注意的参考代码:print(sum(list(map(int, [i*'2' for i in range(1,int(input())+1)]))…… 题解列表 2023年11月12日 1 点赞 4 评论 871 浏览 评分:10.0
蓝桥杯算法提高VIP-笨小猴(python) 摘要:解题思路:注意事项:参考代码:try: def prime(x): # 判断x是否为质数 for i in range(1, x): if x % i ==…… 题解列表 2023年11月11日 0 点赞 0 评论 556 浏览 评分:0.0
python语言编写Hello world 摘要:注意题目要求打印的什么,可以使用\n进行换行print("**************************\nHello World!\n**************************")…… 题解列表 2023年11月11日 1 点赞 0 评论 546 浏览 评分:0.0
蓝桥杯2022年第十三届省赛真题-重新排序 摘要:```python n=int(input()) N=list(map(int,input().split())) m=int(input()) s=0 L=[0]*n for i in …… 题解列表 2023年11月11日 3 点赞 1 评论 616 浏览 评分:9.3
计算直线的交点数 摘要:limit_max = 21 max_point = 200 # 行下标r代表直线数目,列下标c代表交点数目, # point[r][c]的值(0,1)则代表交点数是否存在 point =…… 题解列表 2023年11月11日 0 点赞 0 评论 647 浏览 评分:9.9
题目 1739: 成绩排序 摘要:解题思路:注意事项:参考代码:def compare_students(student): name, age, score = student return (score, name, …… 题解列表 2023年11月10日 0 点赞 0 评论 554 浏览 评分:2.0
最后两个测试例 都比较坑,需要特判,附带样例 摘要:import pprint r,c=map(int,input().split()) b=[] for x in range(c): b.append(list(input())) …… 题解列表 2023年11月09日 0 点赞 0 评论 324 浏览 评分:0.0
简单用法“建议新手观看” 摘要:解题思路:注意事项:参考代码:n=int(input())a=1b=0c=1for i in range(1,n+1): c+=1 b=a print(a,end=" ") f…… 题解列表 2023年11月08日 0 点赞 0 评论 440 浏览 评分:9.9
出圈:重点是怎么在反复遍历一个圈时确定下标问题 摘要:解题思路:本题可以将所有的人从1到m设置好序号,然后放到列表里面,序号存在表示该人尚未出圈,每次遍历时index更新为(index+(m-1))%len(c),保证下标在超过范围时能够正确判断,每一次…… 题解列表 2023年11月08日 0 点赞 0 评论 497 浏览 评分:9.9
[编程入门]三个数找最大值 摘要:解题思路:if-else注意事项:参考代码:a,b,c = map(int,input().split())if a>b: if a>c: print(a) else: …… 题解列表 2023年11月07日 1 点赞 0 评论 837 浏览 评分:9.9