用筛法求之N内的素数:C语言素数筛 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int a[1000];int main(){ int n,m,i,j,cnt=0; scanf("%d",&n); for(i=2;i…… 题解列表 2022年01月19日 0 点赞 0 评论 444 浏览 评分:9.9
[c++]蓝桥杯算法训练VIP-数的统计 摘要:解题思路:参考代码:#include<iostream>#include<algorithm>using namespace std;struct Number{ //将每个数与出现个…… 题解列表 2022年01月19日 0 点赞 0 评论 449 浏览 评分:9.9
论进行循环前比大小的重要性 摘要:解题思路:优先比较输入的两个数的大小,从而可以比较方便地开始进行循环,大大减少了两个数的比较相关代码行数。注意事项:两个for循环第一次找到最大公约数和最小公倍数之后要有break退出循环。参考代码:…… 题解列表 2022年01月19日 0 点赞 0 评论 596 浏览 评分:9.9
暴力出奇迹 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int n; int sum; bool check(int n) { …… 题解列表 2022年01月19日 0 点赞 0 评论 603 浏览 评分:9.9
注意w大于2^k进制数所能达到的最大的位数 摘要: #include #include using namespace std; int Level(int k, int w){ //计算用2^k进制表示的数,最多的…… 题解列表 2022年01月19日 0 点赞 0 评论 670 浏览 评分:9.9
约瑟夫环——循环链表 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<stdlib.h> struct student { int num; struct st…… 题解列表 2022年01月19日 0 点赞 0 评论 471 浏览 评分:9.9
相对目前的题解中确实是最简单的答案 摘要:解题思路:首先要将一个数组和要插入的值输入进去,可利用循环来做。再用循环将数组中的每个元素与插入值进行比较排序注意事项:因为输出后的数据是排成一列的,要特别注意输出语句中的数据说明(已踩雷)参考代码:…… 题解列表 2022年01月20日 0 点赞 0 评论 442 浏览 评分:9.9
使用排列组合(插入0) 摘要:解题思路:使用排列组合注意事项:参考代码:#include<iostream>#include<math.h>using namespace std;int jiech(int n){ int …… 题解列表 2022年01月20日 0 点赞 0 评论 434 浏览 评分:9.9
这个为啥不行 摘要:解题思路:输入十六进制,直接输出八进制,这种方法在2080中都可以注意事项:参考代码:#include <stdio.h>int main(){ int n; scanf("%d",&n)…… 题解列表 2022年01月20日 0 点赞 4 评论 426 浏览 评分:9.9
题解 1021: [编程入门]迭代法求平方根 摘要:解题思路: 首先猜测一个值X1=a/2,然后根据迭代公式 X(n+1)=(Xn+a/Xn)/2注意事项:参考代码:public class test1021 {// 用迭代法求 平方根//…… 题解列表 2022年01月20日 0 点赞 1 评论 1265 浏览 评分:9.9