[编程入门]完数的判断-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int stu(int n){//找因数 ,判断完数。 int a[1000]; int i=…… 题解列表 2020年08月28日 0 点赞 0 评论 1539 浏览 评分:9.9
求平方和-题解(C语言代码) 摘要:解题思路:一种是直接a*a+b*b,还有一种是用数学函数pow(a,2)+pow(b,2)注意事项:当用数学函数时不要忘记头文件#include<math.h>参考代码:#include<stdio.…… 题解列表 2020年08月28日 0 点赞 4 评论 2630 浏览 评分:9.9
C语言训练-"水仙花数"问题1-题解(C语言代码) 摘要:参考代码:#include<stdio.h> main() { int a,x=0,j,m; scanf("%d",&m); a=m; while(a!=0…… 题解列表 2020年08月28日 0 点赞 0 评论 1164 浏览 评分:9.9
蓝桥杯2015年第六届真题-穿越雷区-题解(Python代码) 摘要:解题思路: 很明显用广搜就能解决。参考代码:n = int(input()) #模拟地图 mMap = [list(input().split()) for _ in range(n)] …… 题解列表 2020年08月28日 0 点赞 0 评论 913 浏览 评分:9.9
C语言训练-"水仙花数"问题2-题解(C语言代码) 摘要:注意事项:水仙花是三位数,所以100~1000之间的数参考代码:#include<stdio.h> #include<math.h> main() { int i,a,x; …… 题解列表 2020年08月28日 0 点赞 0 评论 1235 浏览 评分:9.9
C语言训练-求矩阵的两对角线上的元素之和-题解(C语言代码) 摘要:解题思路: a[j][i] a[j][i]1 2 3 //a[0][0] a[2][0]4 5 6 //a[1][1] a[1][1]7 8 9 /…… 题解列表 2020年08月28日 0 点赞 0 评论 1396 浏览 评分:9.9
我不是张玉想——生命之树-题解(C++代码) 摘要:## 一、解题思路: #### 树形DP ## 二、完整代码(仅供参考,欢迎提出建议和指正) ```cpp #include #include #include #include #i…… 题解列表 2020年08月28日 0 点赞 0 评论 1673 浏览 评分:9.9
发工资咯-题解(C++代码)暴力大法 摘要:解题思路:0 数组存放{1,2,5,10,50,100}钞票的数额用于循环遍历确定位置1main 用while循环输入!=0,n是每次循环的次数,当n=0是代表输入结束,n次循环内的每次输…… 题解列表 2020年08月28日 0 点赞 0 评论 577 浏览 评分:9.9
归并排序求逆序对个数-题解(C语言代码) 摘要:解题思路:归并排序 只不过加了个记录变量ans注意事项:参考代码:#include<stdio.h>long long ans = 0;int a[500005], b[500005], n;void…… 题解列表 2020年08月29日 0 点赞 1 评论 1261 浏览 评分:9.9
[编程入门]Sn的公式求和-题解(C语言代码) 摘要:解题思路:由题目可知,n=5时,最大的数为5位数,因此我就想到了用次方来算,而次方需要用到pow函数,比如pow(10,n)就表示10的n次方。再看,n=5时=2+22+222+2222+22222,…… 题解列表 2020年08月29日 0 点赞 1 评论 681 浏览 评分:9.9