题解列表
1111: Cylinder ,python版本
摘要:pi = 3.14159265358while True: try: w,h=map(int,input().strip().split()) if w == 0 and h == 0: ……
1183: 人见人爱A+B
摘要:解题思路:注意事项:参考代码:n=int(input())for i in range(n): a,b,c,d,e,f=map(int,input().split()) s=(c+f)%6……
优质题解
1110: 2^k进制数,动态规划dp解决!
摘要:##解题思路:
利用动态规划的思想:
二维矩阵的dp[i][j]值的含义是:当一共有(i+1)位数字且最高位数字位数字是j的时候满足条件的数字总个数是多少。
###初始条件:
dp[0][]=……
蓝桥杯基础练习VIP-时间转换-Python
摘要:```
t = int(input())
h = t // 3600
m = (t % 3600) // 60
s = t % 60
list = [h, m, s]
print(':……
蓝桥杯基础练习VIP-分解质因数-递归
摘要:```
import math
n, m = map(int, input().split())
def is_prime(num):
for i in range(2, in……
蓝桥杯基础练习VIP-矩阵乘法-python
摘要:```
n, m= map(int, input().split())
list = [list(map(int, input().split())) for i in range(n)]
li……
蓝桥杯基础练习VIP-矩形面积交-Python
摘要:```
A = list(map(float, input().split()))
B = list(map(float, input().split()))
# 两大种情况下各三小种情况
……
母牛的故事(Python代码)
摘要:解题思路:运用递归的方法的话会因为效率低超时,所以用列表先直接将题目要求的限制年数的每一年的对应值直接放入列表中,每次输入年份n则将n对应列表里的数值输出即可。参考代码:a=[int(i) for i……