题解列表
直接乘,不用再倒数变幻,于是直接累加即可,1个循环
摘要:解题思路:1.由于直接乘,不用再倒数变幻,于是直接累加即可,1个循环。2.因为1,每次累乘后,无需更新,直接继续,累加即可。3.用pow不稳定?注意:这类题最后结果sum+1。参考代码:#includ……
编写题解 1073: 弟弟的作业
摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h> //atio函数,将字符串转换为数字.#include<string.h> ……
蓝桥杯2024年第十五届省赛真题-好数
摘要: #include
int main()
{
int n;
int d = 0;;
int u = 1;
int c = 0;……
1033: [编程入门]自定义函数之字符提取
摘要: #include
int main()
{
char a[1000];
char s[1000];
gets(a);
int……
1723: 求最大值 超级简单做法
摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"
using namespace std;
int main(){
// 定义一个长度为10的整型数组a
……
蓝桥杯基础练习VIP-Huffuman树C++
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>int main(){ int n,pay=0; ……
检验每个数位上的值并计数:临时变量、while属性,进位位置区分
摘要:解题思路:1.检验每个数位上的值并计数:while;%10求模;count++;/10更新。2.临时变量:转换for与while循环的区分属性:while会从0-n全部循环一遍,只用1次,内部/10迭……
一个简单的自定义函数 来处理 素数
摘要:解题思路:试除法判断scanf输入的数 是or不是素数注意事项:循环的优化参考代码:#include <stdio.h>#include <math.h>int is_Prime(int a){ in……
1725: 统计字符 超简单做法
摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h"
using namespace std;
int main(){
// 定义两个字符串变量s1和s2
……