蓝桥杯算法训练VIP-寂寞的数-题解(Python代码)python开荒柘,简单题,筛法变形 摘要:```python n=int(input()) L=[] for i in range(n+1): L.append(i) re=[] point=0 while point…… 题解列表 2020年03月29日 0 点赞 0 评论 593 浏览 评分:5.3
蓝桥杯算法提高VIP-学霸的迷宫-题解(Python代码) 摘要:BFS,好像没什么好说的 ```python class Node: def __init__(self, x, y, w): self.x = x …… 题解列表 2020年03月28日 0 点赞 0 评论 730 浏览 评分:7.0
[编程入门]最大公约数与最小公倍数-题解(Python代码) 摘要: def gcd(a, b): if b == 0: return a return gcd(b, a%b) while True: try: a, b = …… 题解列表 2020年03月28日 0 点赞 0 评论 1012 浏览 评分:0.0
蓝桥杯算法提高VIP-Torry的困惑(提高型)-题解(Python代码) 摘要:```python #请教大佬,如何解决超时?我是渣渣,求解决。 import math n=int(input()) l=f=0 s=1 for i in range(2,10…… 题解列表 2020年03月26日 0 点赞 0 评论 594 浏览 评分:0.0
抢夺资源-题解(Python代码)py开荒柘,前几天刚刚看完博弈论的课,这题就是一道巴什博弈 摘要:还是先上代码,其实也不用看,跟别人的差不多 ```python while True: base=[int(i) for i in input().split()] n,m=base[0]…… 题解列表 2020年03月26日 0 点赞 0 评论 597 浏览 评分:6.0
采药-题解(Python代码) 摘要: # 采药 # 动态规划,01背包问题 # 所谓01背包问题:就是进行“采与不采”的优质选择 # dp[i] = max(采, 不采) # 信…… 题解列表 2020年03月26日 0 点赞 1 评论 1347 浏览 评分:9.9
蛇行矩阵-题解(Python代码) 摘要:n=eval(input()) a=1 #记录每行首值 m=0 #记录各行首值的差值 for i in range(1,n+1): #输出n行 b=a #b记录每行数值,从首值a开始 …… 题解列表 2020年03月26日 0 点赞 1 评论 545 浏览 评分:9.6
[编程入门]字符串分类统计-题解(Python代码) 摘要:```python a=input() #默认输入是str str_count=0 #定义变量 int_count=0 kongge=0 other=0 for i in a: …… 题解列表 2020年03月25日 0 点赞 0 评论 615 浏览 评分:0.0
蓝桥杯基础练习VIP-报时助手-题解(Python代码) 摘要: #未用字典,用的列表 a,b=map(int,input().split()) ls=['zero','one','two','three','four','five','…… 题解列表 2020年03月25日 0 点赞 0 评论 469 浏览 评分:0.0
蓝桥杯2015年第六届真题-穿越雷区 (Python代码)BFS算法 摘要:```python n=int(input()) df=[[0 for i in range(n)] for j in range(n)] for i in range(n): STR…… 题解列表 2020年03月25日 0 点赞 0 评论 777 浏览 评分:9.9