[编程入门]等差数列---for循环---(Python) 摘要:Python 每个数相差了3,所有每次循环对s都加上3用sum累加 ```python n=int(input()) sum=2 s=2 for i in range(1,n): …… 题解列表 2021年11月03日 0 点赞 0 评论 1274 浏览 评分:9.9
[编程入门]同因查找---for循环---(Python) 摘要:```python for i in range(10,1001): if i%2==0 and i%3==0 and i%7==0: print(i) ``` 通过…… 题解列表 2021年11月03日 0 点赞 1 评论 1059 浏览 评分:9.9
2^k进制数代码详细说明 摘要:解题思路:找到规律即可注意事项:主要要注意分段后可能剩下的不能组成k位的数值取值情况参考代码:import mathk,w=map(int,input().split())a=math.ceil(w/…… 题解列表 2021年11月03日 0 点赞 0 评论 551 浏览 评分:9.9
K-进制数 递归算法,10行C++代码,满分解决 摘要:解题思路: 假设K=10,first0(1)表示当N为1,最高位为0时满足条件的数量,first1(1)表示N为1,最高位不为0(即1~K-1)时满足条件的数量: 1、当N=1时,firs…… 题解列表 2021年11月03日 0 点赞 0 评论 713 浏览 评分:9.9
2544,好懂的方法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int i,N,sum=0; scanf("%d",&N); for(i=1;i<=N;…… 题解列表 2021年11月03日 0 点赞 0 评论 921 浏览 评分:9.9
1509,考眼力的好题 摘要:解题思路:注意事项:眼不要花!!!!!!!参考代码:#include <stdio.h>int main(){ printf(" X | X | X\n"); printf("…… 题解列表 2021年11月03日 0 点赞 0 评论 499 浏览 评分:9.9
计算球的体积,简单易懂(C++) 摘要:解题思路:通过球的体积公式求解 注意事项:基础知识的应用参考代码:#include<stdio.h>int main(){ double r,v,a=3.14159; while(sca…… 题解列表 2021年11月04日 0 点赞 0 评论 1844 浏览 评分:9.9
1255: 蓝桥杯算法提高-能量项链 DP解决 摘要: n = int(input()) a = list(map(int, input().split())) a.extend(a) a.append(a…… 题解列表 2021年11月04日 0 点赞 0 评论 712 浏览 评分:9.9
蓝桥杯2019年第十届省赛真题-完全二叉树的权值 摘要:解题思路:观察二叉树每层的序号第一层 2的0次方第二层 2的1次方 到 2的2次方-1等等我们可以记录最大值然后求出每层的和,比较如果sum比较大的话同时更新max和每层开头序号maxi即可注意事项…… 题解列表 2021年11月04日 0 点赞 0 评论 745 浏览 评分:9.9
蓝桥杯2019年第十届省赛真题-修改数组(路径压缩+卡cin问题) 摘要:解题思路:类似于并查集的思想进行路径压缩注意事项:参考代码:AC代码#includeusing namespace std;int used[1000005], n, num;int findnext…… 题解列表 2021年11月04日 0 点赞 0 评论 827 浏览 评分:9.9