1011: [编程入门]最大公约数与最小公倍数(Python代码) 摘要:#### **解题思路:** 1.**输入**a,b,用**map**函数实现 2.**最大公约数**:可以用**枚举**方法实现 3.**最小公倍数**:公式为 **a…… 题解列表 2022年07月22日 1 点赞 0 评论 799 浏览 评分:10.0
蓝桥杯2014年第五届真题-分糖果 (一般思路) 摘要:```cpp #include using namespace std; int main() { int n; //n个人 int ans=0;//记录老师需要补发的糖果数 …… 题解列表 2022年07月28日 1 点赞 0 评论 305 浏览 评分:10.0
耍个小聪明 摘要:# Python解决平方根问题 在python中,math库提供sqrt()函数来完成平方根操作。 那还有啥好说的?! ```python import math a = int(input…… 题解列表 2022年08月08日 1 点赞 0 评论 518 浏览 评分:10.0
1315: 田忌赛马 摘要:解题思路:1、先将田忌和齐王最快的马进行比较如果田忌的马更快则先赢一局2、如果田忌最快的马比齐王慢,则比较两者最慢的马,如果田忌的快则派出最慢的马赢下一局。3、如果1、2都不成立,则比较田忌最慢的马和…… 题解列表 2022年08月12日 0 点赞 0 评论 707 浏览 评分:10.0
蓝桥杯2016年第七届真题-路径之谜(DFS) 摘要:```cpp #include using namespace std; const int N = 21; int topCount[N]; int leftCount[N]; bo…… 题解列表 2022年08月16日 1 点赞 0 评论 385 浏览 评分:10.0
数组乘常数—2^(n+1)-2 摘要:解题思路:汉罗双塔的次数为2*2(^(n)-1);注意事项:参考代码:#include <stdio.h> #include <malloc.h> #include <string.h> int…… 题解列表 2022年09月13日 0 点赞 0 评论 390 浏览 评分:10.0
优质题解 【C语言】数字游戏:从暴力循环到精简代码 - DotcppXF 摘要:【解题思路】 将题目描述的游戏规则转化为数学规律问题,不断优化代码,解决【时间超限】和【数据超范围】两大难点。【1】常规解法(暴力循环求解) ① 直接按题目描述的规则写代码…… 题解列表 2022年10月04日 3 点赞 5 评论 1591 浏览 评分:10.0
实数的打印 摘要: #include #include #include using namespace std; int main() { floa…… 题解列表 2022年10月12日 2 点赞 0 评论 271 浏览 评分:10.0
[编程入门]矩阵对角线求和,最容易理解的解法,非常暴力 摘要:解题思路:注意事项:没有丝毫含金量参考代码:x=list(map(int,input().split()))y=list(map(int,input().split()))z=list(map(int…… 题解列表 2022年10月23日 1 点赞 0 评论 954 浏览 评分:10.0
aaaaaaaaaaaaaaaaaaa 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&n); while(n--) …… 题解列表 2022年10月24日 0 点赞 0 评论 276 浏览 评分:10.0