优质题解 仅利用二维数组控制行列之和解决蛇形矩阵 摘要:解题思路:1 3 6 10 152 5 9 144 8 137 1211首先定义二维数组num[5][5],根据数字递增的规律观察行列之和的关系;a[0][0]=1(行+列=0)a[1][0]=2 a…… 题解列表 2022年05月03日 1 点赞 7 评论 1465 浏览 评分:8.5
信息学奥赛一本通T1547-区间和-题解(C语言代码) 摘要:```c #include #include long*l; long f(int x){ *l=0; do *l+=l[x]; while(x-=x&-x); return …… 题解列表 2022年05月03日 0 点赞 0 评论 761 浏览 评分:8.0
信息学奥赛一本通T1541-数列区间最大值-题解(C++代码) 摘要:```c++ #include using namespace std; int main(){ int n,m; scanf("%d%d",&n,&m); int k=-~__lg…… 题解列表 2022年05月03日 0 点赞 0 评论 628 浏览 评分:9.1
[编程入门]数组插入处理 摘要:解题思路:把新的插入变量带入兑换为其中一个比他大的量然后交换以此类推注意事项:参考代码:#include<stdio.h>int main(){ int s[9],i,t,x; for(i=0;i<9…… 题解列表 2022年05月03日 0 点赞 0 评论 302 浏览 评分:0.0
利用递归函数来求阶乘 摘要:解题思路:先定义一个函数,用递归思想求一个数的阶乘,再用for循环求1~30的每个数的阶乘,最后注意%.2e表示科学计数法并且保留两位小数注意事项:参考代码:def func(x): if x=…… 题解列表 2022年05月02日 0 点赞 0 评论 538 浏览 评分:0.0
C++ 最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10], i = 0, te…… 题解列表 2022年05月02日 0 点赞 0 评论 533 浏览 评分:0.0
1024: [编程入门]矩阵对角线求和 摘要:解题思路:注意事项:小弟代码先奉上为敬: a = list(map(int,input().split()))b = list(map(i…… 题解列表 2022年05月02日 0 点赞 0 评论 1088 浏览 评分:9.9
1000: [竞赛入门]简单的a+b c++代码题解 摘要:解题思路:用iostream资源库和cstdio资源库都可解题注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,…… 题解列表 2022年05月02日 0 点赞 0 评论 1488 浏览 评分:9.9
小白也能懂的入门代码 摘要:解题思路:注意事项:参考代码:for i in range(100,1000): a,b,c=str(i) if int(a)**3+int(b)**3+int(c)**3==int(i)…… 题解列表 2022年05月02日 0 点赞 0 评论 452 浏览 评分:8.7
排队打水c++版 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm>#include<cstring>using namespace std;const int …… 题解列表 2022年05月02日 0 点赞 0 评论 704 浏览 评分:9.0