题解 3209: 蓝桥杯2024年第十五届省赛真题-好数

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

dafasdfasdfasdf

解题思路:注意事项:参考代码:#includeintff(intn){inti=0;intsum;inttemp;while(n>0){temp=n%10;n/=10;i++;if(i%2!=0){if(temp%2!=0){sum=1;}else{sum=0;break;}}if(

好数的常规思路

摘要:解题思路:注意事项:参考代码:#include<stdio.h>inthaoshu(intn);inthaoshu(intn){……

蓝桥杯求好数问题

解题思路:可以用switch语句来解决此题,写一个来计算一个数的位数的函数,写一个计算好数个数的函数,在此函数中需要调用前一个函数用一个数组来保存这个数的奇偶信息,如果为1则该位为奇数,反之,则为偶。用一个全局变量来表示好数的个数注意事项:swich语句格式参考代码:#include

c语言 好数

摘要:解题思路:注意事项:参考代码:#include<stdio.h> int hs(int n){ int k1,k2; int flag; while(1){               ……

好数的题解(c语言版本)

摘要:解题思路:注意事项:不要用每个数字直接带入 ,要用temp记录,不然容易死循环参考代码:#include<stdio.h>int main(){    int N = 0;    int num = ……