一个简单的自定义函数 来处理 素数 摘要:解题思路:试除法判断scanf输入的数 是or不是素数注意事项:循环的优化参考代码:#include <stdio.h>#include <math.h>int is_Prime(int a){ in…… 题解列表 2024年12月07日 1 点赞 0 评论 1035 浏览 评分:10.0
检验每个数位上的值并计数:临时变量、while属性,进位位置区分 摘要:解题思路:1.检验每个数位上的值并计数:while;%10求模;count++;/10更新。2.临时变量:转换for与while循环的区分属性:while会从0-n全部循环一遍,只用1次,内部/10迭…… 题解列表 2024年12月07日 0 点赞 0 评论 180 浏览 评分:0.0
蓝桥杯基础练习VIP-Huffuman树C++ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>int main(){ int n,pay=0; …… 题解列表 2024年12月07日 1 点赞 0 评论 286 浏览 评分:0.0
1723: 求最大值 超级简单做法 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义一个长度为10的整型数组a …… 题解列表 2024年12月07日 0 点赞 0 评论 188 浏览 评分:0.0
1033: [编程入门]自定义函数之字符提取 摘要: #include int main() { char a[1000]; char s[1000]; gets(a); int…… 题解列表 2024年12月07日 0 点赞 0 评论 739 浏览 评分:10.0
蓝桥杯2024年第十五届省赛真题-好数 摘要: #include int main() { int n; int d = 0;; int u = 1; int c = 0;…… 题解列表 2024年12月07日 1 点赞 0 评论 669 浏览 评分:10.0
编写题解 1073: 弟弟的作业 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h> //atio函数,将字符串转换为数字.#include<string.h> …… 题解列表 2024年12月07日 3 点赞 0 评论 599 浏览 评分:10.0
直接乘,不用再倒数变幻,于是直接累加即可,1个循环 摘要:解题思路:1.由于直接乘,不用再倒数变幻,于是直接累加即可,1个循环。2.因为1,每次累乘后,无需更新,直接继续,累加即可。3.用pow不稳定?注意:这类题最后结果sum+1。参考代码:#includ…… 题解列表 2024年12月07日 1 点赞 0 评论 176 浏览 评分:0.0
新手 乘方计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d",&a,&b); c=pow(a,b); …… 题解列表 2024年12月07日 0 点赞 0 评论 217 浏览 评分:0.0
两个循环嵌套,注意变量更新位置、积乘累加的位置 摘要:解题思路:1.两个循环嵌套,n<=15允许。2.i与j的关系,保证j<=i,否则就乱序了。3.m的位置&sum的位置:m需要定义在内部循环外,每次内部循环后更新结果为1,确保循环计算从1再积乘;sum…… 题解列表 2024年12月07日 0 点赞 0 评论 155 浏览 评分:0.0