蓝桥杯2024年第十五届省赛真题-好数 暴力 摘要:解题思路:注意事项:参考代码:#include"iostream"using namespace std;int main(){ int n; int s=0; int x=1; cin>>n; fo…… 题解列表 2024年11月27日 1 点赞 0 评论 902 浏览 评分:0.0
暴力枚举 #3209: 蓝桥杯2024年第十五届省赛真题-好数 摘要:``` #define _CRT_SECURE_NO_WARNINGS 1 #include #include #include #include #include #include …… 题解列表 2024年11月25日 4 点赞 0 评论 618 浏览 评分:9.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:非常规解法,专门对付10^18次方的大数量级注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int k1[]={1,3,5,7,9}…… 题解列表 2024年11月20日 0 点赞 0 评论 320 浏览 评分:2.0
好数 基本思想简单易懂(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>//切勿随意抄袭,若需引用请标明作者int is_good_num(int num) …… 题解列表 2024年10月31日 10 点赞 0 评论 973 浏览 评分:10.0
蓝桥杯2024年第十五届省赛真题-好数 摘要: ``` #include int haoshu(int num){ for (int i = 0; num!=0; i++) { int t=nu…… 题解列表 2024年10月29日 2 点赞 0 评论 171 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码#include <iostream>using namespace std;bool check(int x);int main(){ /*一个数奇数位为奇数,偶数位为偶…… 题解列表 2024年10月17日 0 点赞 0 评论 297 浏览 评分:6.0
to_string的大作用 摘要:参考代码:#include<bits/stdc++.h> using namespace std; #define int long long bool haoshu(int i) { s…… 题解列表 2024年10月07日 1 点赞 0 评论 151 浏览 评分:0.0
3209: 蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码:def is_good_number(num): k = 1#初始化变量k为1,用于跟踪当前数字的位数 (这里从右边开始,第一位是奇数) while num:…… 题解列表 2024年10月04日 1 点赞 0 评论 357 浏览 评分:0.0
c语言 好数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int hs(int n){ int k1,k2; int flag; while(1){ …… 题解列表 2024年09月22日 0 点赞 0 评论 374 浏览 评分:8.4
蓝桥杯求好数问题 摘要:解题思路:可以用switch语句来解决此题,写一个来计算一个数的位数的函数,写一个计算好数个数的函数,在此函数中需要调用前一个函数用一个数组来保存这个数的奇偶信息,如果为1则该位为奇数,反之,则为偶。…… 题解列表 2024年09月22日 1 点赞 0 评论 238 浏览 评分:0.0