python-矩阵乘法 摘要:解题思路:注意事项:参考代码:def f(A,n,m): if m == 0: C = [[1 if i == j else 0 for j in 题解列表 2022年02月16日 0 点赞 1 评论 298 浏览 评分:8.0
编写题解 1192: 十->二进制转换 摘要:解题思路:注意事项:参考代码:while True: try: a=int(input()) if a>=0: print(f"{a}-->{bin(a)[2:]}") …… 题解列表 2022年02月16日 0 点赞 0 评论 461 浏览 评分:5.6
python-2n皇后问题 摘要:解题思路:这道题其实和n皇后的题没有太大的差别。做法是这样的,首先找出黑皇后的所有结果(这里暂时不考虑白皇后)。详细做法可参考我之间写的一篇文章,介绍很详细。https://blog.dotcpp.c…… 题解列表 2022年02月15日 0 点赞 0 评论 434 浏览 评分:0.0
python-连号区间数 摘要:解题思路:建立两层循环。第一层循环为l,第二层循环为r。每次更新区间[l,r]的最小值和最大值。如果(最大值-最小值)= (r-l),则连续区间数量加1。注意事项:参考代码:def f(n): …… 题解列表 2022年02月15日 0 点赞 0 评论 239 浏览 评分:0.0
蓝桥杯2020年第十一届国赛真题-循环小数python解法 摘要:解题思路:注意事项:参考代码:p,q = map(int,input().split())a = int(input())a = int(a/(10**q) * 10**q - int(a/(10**…… 题解列表 2022年02月15日 0 点赞 0 评论 455 浏览 评分:5.0
编写题解 1257: 超级楼梯 摘要:解题思路:参考代码:def f(x): if x <= 2: return 1 else: return f(x-1) 题解列表 2022年02月15日 0 点赞 0 评论 209 浏览 评分:0.0
1256: 诡秘的余数 摘要:解题思路:注意事项:参考代码:while True: try: a,b=map(int,input().split()) if a<b: …… 题解列表 2022年02月15日 0 点赞 0 评论 164 浏览 评分:0.0
编写题解 1251: 统计字母个数 摘要:解题思路:注意事项:参考代码:stri='' while True: try: stg='' sti=map(str,i…… 题解列表 2022年02月15日 0 点赞 0 评论 264 浏览 评分:0.0
编写题解 1250: 素数回文 摘要:解题思路:注意事项:参考代码:def isprime(x): ls=[1,3,7,9] lis=[2,3,5,7] if 1<=x<=10: if x …… 题解列表 2022年02月15日 0 点赞 0 评论 175 浏览 评分:0.0
编写题解 1249: 简单编码 摘要:解题思路:注意事项:参考代码:dic={ 'A': 'I', 'W': 'I', 'F': 'I…… 题解列表 2022年02月15日 0 点赞 0 评论 231 浏览 评分:0.0