2878: 计算矩阵边缘元素之和 python实现,超简单的思路 摘要:解题思路:我看有的同学用的蛇形矩阵思路来做的,我想的是,既然只要是边缘的值,那我直接用i和j判定。i=0/m-1的时候就是在第一行或者最后一行,j=0/n-1的时候,就是第一列或者最后一列,遇到这种直…… 题解列表 2023年12月05日 0 点赞 0 评论 538 浏览 评分:10.0
极其简单,走过路过别错过 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,i,cnm=-2;\\方便后面的输出 scanf("%d",&n); int a[100000],b…… 题解列表 2023年12月05日 1 点赞 0 评论 377 浏览 评分:10.0
编写题解 3003: 鸡兔同笼问题 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,b; cin>>a>>b; cout…… 题解列表 2023年12月09日 1 点赞 0 评论 496 浏览 评分:10.0
1446: 蓝桥杯2013年第四届真题-核桃的数量 摘要: $$GCD(A,B)\times LCM(A,B)=A\times B$$ ```cpp #include using namespace std; // 最大公约数 int GCD(…… 题解列表 2023年12月09日 2 点赞 0 评论 490 浏览 评分:10.0
编写题解 3007: 收费 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ double a; cin>>a; if…… 题解列表 2023年12月11日 1 点赞 0 评论 386 浏览 评分:10.0
【基础】思维数字的处理与判断 摘要:解题思路:按照题目给的限制不超过5位数进行解答可以使用if-else if进行解答先给定范围判断为几位数,得出结论后进行单个数字拆解,最后做一个逆序输出即可按照小白入门解法代码较多且比较磨人注意事项:…… 题解列表 2023年12月13日 0 点赞 0 评论 546 浏览 评分:10.0
跟我徐海东学,acm金牌你也行! 摘要:参考代码:#includelong long ans[29000000], n;int main(){ scanf("%lld", &n); ans[1] = n * 6; for(…… 题解列表 2023年12月13日 1 点赞 2 评论 546 浏览 评分:10.0
没其它,就是简单易懂 摘要:解题思路:因为是从a[i+1]一直乘到a[n],那么令sum=a[i+1]+...+a[n]故可合并为a[i]*sum注意事项:每次sum的值都要减去a[i]参考代码:#include<stdio.h…… 题解列表 2023年12月14日 1 点赞 0 评论 755 浏览 评分:10.0
2809: 菲波那契数列(两种方法) 摘要:```c //第一种方法:递归 //性能较差 #include int result(int n) { if (n …… 题解列表 2023年12月16日 0 点赞 0 评论 709 浏览 评分:10.0
编写题解 2787: 有一门课不及格的学生 摘要:解题思路:注意事项:参考代码:score = list(map(int, input().split())) if min(score) < 60: if max(score) >= 60…… 题解列表 2023年12月17日 1 点赞 0 评论 452 浏览 评分:10.0