[编程入门]宏定义之闰年判断-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;#define LEAP_YEAR(y) (y%400==0||(y%4==0&&y%100…… 题解列表 2020年08月12日 0 点赞 0 评论 585 浏览 评分:0.0
用筛法求之N内的素数。 -题解(C语言代码) 摘要:解题思路:先写一个判断是否是素数的函数,接下来就好做了素数是只能被1或自己本身整除的数bool isPrimeNum(int x){ if(x <= 1) return false; //1不是素…… 题解列表 2020年08月12日 0 点赞 0 评论 667 浏览 评分:7.3
[编程入门]自由下落的距离计算-题解(C语言代码) 摘要:解题思路:我们设高度为m,则第5次的距离之和为m+m/2+m/2+m/4+m/4+m/8+m/8+m/16+m/16,看懂了吗,不懂没关系,看代码注意事项:详见代码参考代码#include <stdi…… 题解列表 2020年08月11日 0 点赞 0 评论 985 浏览 评分:0.0
[编程入门]三个数最大值-题解(C语言代码) 摘要:解题思路:三个数求最大值注意事项:可以用if,也可以用三目运算符参考代码:if(表达式) /*若表达式成立则执行语句1,否则执行语句2*/ { //语句1 } else {…… 题解列表 2020年08月11日 0 点赞 0 评论 725 浏览 评分:9.0
蓝桥杯2015年第六届真题-饮料换购-题解(C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int n;int ans;int main(void){ cin>>n; ans+=n; w…… 题解列表 2020年08月11日 0 点赞 0 评论 627 浏览 评分:0.0
C语言训练-"水仙花数"问题2-题解(C++代码) 摘要:解题思路:。。。。。。。注意事项:???????参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a; …… 题解列表 2020年08月11日 0 点赞 0 评论 889 浏览 评分:7.0
C语言训练-"水仙花数"问题2-题解(C++代码) 摘要:解题思路:。。。。。。。注意事项:???????参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a; …… 题解列表 2020年08月11日 0 点赞 0 评论 1098 浏览 评分:9.9
diamond-题解(C语言代码) 摘要:解题思路:找出空格和‘*’数量和行数i的关系,用循环实现对每行空格和‘*’的输出注意事项:参考代码:#include<stdio.h>int main(){ int n,i,m,j,k; scanf(…… 题解列表 2020年08月11日 0 点赞 0 评论 1399 浏览 评分:7.3
C语言训练-列出最简真分数序列*-题解(C++代码) 摘要:解题思路:无(实在想不出)注意事项:无 (我也不知道)参考代码:#includeusing namespace std;int main(){ for (int i=1;i<40;i++) { if…… 题解列表 2020年08月11日 0 点赞 0 评论 735 浏览 评分:6.0
蓝桥杯2013年第四届真题-剪格子-题解(C++代码)--笔记 摘要:参考代码:#include<bits/stdc++.h> using namespace std; int m, n; int result = INT_MAX; int a[11][11];…… 题解列表 2020年08月11日 0 点赞 1 评论 2012 浏览 评分:9.9