蓝桥杯2024年第十五届省赛真题-好数 #includeintmain(){intn;intd=0;;intu=1;intc=0;inti=0;scanf("%d",&n);for(inta=1;a10;){d/=10;u++;//u统计位数}d=a;for(intw=1;w 题解列表 2024年12月07日 1 点赞 0 评论 936 浏览 评分:10.0
蓝桥杯2024年第十五届省赛真题-好数 暴力 摘要:解题思路:注意事项:参考代码:#include"iostream"using namespace std;int main(){ int n; int s=0; int x=1; cin>>n; fo…… 题解列表 2024年11月27日 1 点赞 0 评论 1216 浏览 评分:0.0
暴力枚举 #3209: 蓝桥杯2024年第十五届省赛真题-好数 ```#define_CRT_SECURE_NO_WARNINGS1#include#include#include#include#include#include#include#include#include#include#include#include#defineMAX0x3f3f3f3f# 题解列表 2024年11月25日 4 点赞 0 评论 1017 浏览 评分:9.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:非常规解法,专门对付10^18次方的大数量级注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int k1[]={1,3,5,7,9}…… 题解列表 2024年11月20日 0 点赞 0 评论 708 浏览 评分:2.0
好数 基本思想简单易懂(C语言) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>//切勿随意抄袭,若需引用请标明作者int is_good_num(int num) …… 题解列表 2024年10月31日 11 点赞 0 评论 1480 浏览 评分:10.0
蓝桥杯2024年第十五届省赛真题-好数 ```#includeinthaoshu(intnum){for(inti=0;num!=0;i++){intt=num%10;if(((i+1)%2==0&&t%2==0)||((i+1)%2!=0&&t%2!=0)){num/=10;}else{return0;}}return1;}intmain 题解列表 2024年10月29日 2 点赞 0 评论 447 浏览 评分:0.0
蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码#include <iostream>using namespace std;bool check(int x);int main(){ /*一个数奇数位为奇数,偶数位为偶…… 题解列表 2024年10月17日 0 点赞 0 评论 649 浏览 评分: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 评论 399 浏览 评分:0.0
3209: 蓝桥杯2024年第十五届省赛真题-好数 摘要:解题思路:注意事项:参考代码:def is_good_number(num): k = 1#初始化变量k为1,用于跟踪当前数字的位数 (这里从右边开始,第一位是奇数) while num:…… 题解列表 2024年10月04日 1 点赞 0 评论 766 浏览 评分:0.0
c语言 好数 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int hs(int n){ int k1,k2; int flag; while(1){ …… 题解列表 2024年09月22日 0 点赞 0 评论 669 浏览 评分:8.4