蓝桥杯算法训练VIP-幂方分解-题解(Python代码)20行 摘要:解题思路:用二进制对应位数是否为 1 ,来判断分解成2的次幂的情况>>> bin(1315) '0b10100100011'二进制第1,2,6,9,11位是1,对应分解后就是1315…… 题解列表 2020年07月19日 0 点赞 1 评论 652 浏览 评分:9.9
蛇行矩阵-题解(C语言代码) 摘要:```c #include #include #include int n; void main() { scanf("%d",&n); int i,j,sum=1,num=1,t…… 题解列表 2020年07月20日 0 点赞 0 评论 885 浏览 评分:9.9
整除的尾数-题解(C语言代码) 摘要:```c #include #include #include //1、首先将输入的a补全后两位,用遍历后两位从00到99所有的可能性 //2、再将循环中所有的值进行%40取余,如果能够被整…… 题解列表 2020年07月20日 0 点赞 0 评论 718 浏览 评分:9.9
[编程入门]Sn的公式求和-题解(C语言代码) 摘要:#include <stdio.h> int main() { int a=2,n; long long sum=0; scanf("%d",&n); for(int i=0; i<…… 题解列表 2020年07月20日 0 点赞 0 评论 1090 浏览 评分:9.9
[编程入门]求和训练-题解(C语言代码) 摘要:#include <stdio.h> #include<math.h> int main() { int a,b,c; scanf("%d%d%d",&a,&b,&c); float …… 题解列表 2020年07月20日 0 点赞 0 评论 956 浏览 评分:9.9
蓝桥杯历届试题-连号区间数-题解(耗时较少)(C++代码) 摘要:解题思路:其实题目很简单,外层的双重遍历是肯定少不了的,问题就是你在遍历之后进行判断的方法:错误示范:用sort排序,这样耗时太长,会超时。其实对于这道题目因为他的数是连续的,所以比较简单,我们可以利…… 题解列表 2020年07月20日 0 点赞 0 评论 1120 浏览 评分:9.9
[编程入门]自定义函数之整数处理-题解(Python代码) 摘要:参考代码:a = list(map(int,input().strip().split()))for i in a : if i == max(a): a[a.index(max(…… 题解列表 2020年07月20日 0 点赞 0 评论 1147 浏览 评分:9.9
蓝桥杯算法提高VIP-卡勒沃夫之弱水路三千(提高型)-题解(Python代码) 摘要:解题思路:用拓扑排序注意事项:参考代码:from collections import defaultdict class Graph: def __init__(self,ver…… 题解列表 2020年07月20日 0 点赞 1 评论 573 浏览 评分:9.9
盐水的故事-题解(C语言代码) 摘要:```c #include #include #include void main() { double sum,v,d,num=0,temp; scanf("%lf%lf",&v,…… 题解列表 2020年07月20日 0 点赞 0 评论 999 浏览 评分:9.9
C语言训练-素数问题-C++试除法超简单解 摘要: **几种判断素数的方法: 1.直接O(n)判断是否有余数 2.埃氏筛打表O(nloglogn) 3.欧拉筛打表O(n) 4.试除法O(logn) 5.开平方O(n^(1/2)) 综…… 题解列表 2020年07月20日 0 点赞 0 评论 925 浏览 评分:9.9