蓝桥杯2015年第六届真题-奇怪的数列-题解(C++代码) 摘要:#include <iostream>#include <cstring>using namespace std;char a[110000];char s[1000010];int main(){ …… 题解列表 2021年01月30日 0 点赞 0 评论 606 浏览 评分:0.0
检查一个数是否为质数-题解(C++代码) 摘要:解题思路:搞清楚质数的定义,这题就迎刃而解参考代码:#include<iostream> using namespace std; bool check(int z) { for (in…… 题解列表 2021年01月30日 0 点赞 0 评论 740 浏览 评分:0.0
C语言训练-斐波纳契数列-题解(递归优化题解) 解题思路:如果用数学公式算的话,会重复计算很多次,40次往上算出来就需要很长时间了,因此这里想到从前往后的算法。首先从第三项开始往后的每一项用a,b,c记录起来,然后用while循环一直让c记录a+b的值,最后returnc记录斐波那契数就可以了。 题解列表 2021年01月30日 0 点赞 0 评论 779 浏览 评分:0.0
[编程入门]结构体之时间设计-题解(C语言代码) #include#includestructdate{inty;intm;intd};intmain(){inty,m,d;inta[12]={31,28,31,30,31,30,31,31,30,31,30,31},i,j,k=0;scanf("%d%d%d", 题解列表 2021年01月30日 0 点赞 0 评论 595 浏览 评分:6.0
[编程入门]自由下落的距离计算-题解(C语言代码) 摘要: > 引用文本 #include #include /* run this program using the console pauser or …… 题解列表 2021年01月30日 0 点赞 0 评论 492 浏览 评分:0.0
[编程入门]实数的打印-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ float n; scanf("%f",&n); printf("%6.2f\n",n); printf("%6…… 题解列表 2021年01月30日 0 点赞 0 评论 622 浏览 评分:0.0
[编程入门]水仙花数判断-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c; for(int i=100;i<=999;i++…… 题解列表 2021年01月30日 0 点赞 0 评论 584 浏览 评分:0.0
[编程入门]宏定义练习之三角形面积-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define swap(a,b,c) s=(a+b+c)/2;#define mj(a,b,c) ar…… 题解列表 2021年01月30日 0 点赞 0 评论 590 浏览 评分:0.0
[编程入门]宏定义的练习-题解(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define swap(a,b) t=a%b;int main(){ int a,b,t; scanf("%d %d",&a,&b);…… 题解列表 2021年01月30日 0 点赞 0 评论 610 浏览 评分:0.0
Minesweeper -题解(Java代码) 摘要:解题思路:注意事项:参考代码:import java.util.Arrays; import java.util.Scanner; public class Main { public …… 题解列表 2021年01月30日 0 点赞 0 评论 750 浏览 评分:0.0