蓝桥杯算法训练VIP-整除问题 摘要:参考代码: ```c #include int main() { int min,max,factor; scanf("%d%d%d",&min,&max,&factor);//fac…… 题解列表 2023年10月25日 0 点赞 0 评论 206 浏览 评分:0.0
从小到大、从大到小排序 摘要:解题思路:选择排序算法通过选择和交换来实现排序,其排序流程如下:(1)首先从原始数组中选择最小的1个数据,将其和位于第1个位置的数据交换。(2)接着从剩下的n-1个数据中选择次小的1个元素,将其和第2…… 题解列表 2023年10月25日 0 点赞 0 评论 198 浏览 评分:0.0
输出九九乘法表(斯,他这个格式让我摸索半天,数据整%2d,后面空两格,就对了) 摘要:解题思路:注意事项:我这里把表的装饰拿出来,方便复制 printf(" Nine-by-nine Multiplication Table\n"); printf("--------…… 题解列表 2023年10月25日 0 点赞 0 评论 296 浏览 评分:0.0
关键在与看懂集合M的生成是递归生成的 摘要:k,x=map(int,input().split(','))res=0#递归判断x是否在集合m中,不断生成集合m的元素def rec(k,x): global res #…… 题解列表 2023年10月25日 0 点赞 0 评论 254 浏览 评分:0.0
循环入门练习6 摘要:参考代码: ```c #include int main() { int n; scanf("%d",&n); for(int i=1;i…… 题解列表 2023年10月25日 0 点赞 0 评论 281 浏览 评分:0.0
#问题:分解n (大)-----分解n的二进制(小) 摘要:#问题:分解n (大)-----分解n的二进制(小)def rec(n): for x in range(14,-1,-1): s=n-pow(2,x) if s>0…… 题解列表 2023年10月25日 0 点赞 0 评论 147 浏览 评分:0.0
C语言思路简单,易懂!!! 理解万岁 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int n; int a[100],max,max_i; scanf ("%d",&n);…… 题解列表 2023年10月25日 0 点赞 0 评论 222 浏览 评分:0.0
C语言思路简单,易懂!!! 理解万岁 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int n; int a[1000]; while (scanf ("%d",&n)!=E…… 题解列表 2023年10月25日 0 点赞 0 评论 182 浏览 评分:0.0
C语言思路简单,易懂!!! 理解万岁 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main (){ int n,m,num=0; int a[1000]; scanf ("%d",&n); …… 题解列表 2023年10月25日 0 点赞 0 评论 234 浏览 评分:0.0
删除单词后缀(巧秒解题,我们可以利用strlen()获得单词长度,如果单词后面出现那些后缀情况,只需要缩短长度,循环输出每个字符就好了) 摘要:解题思路:注意事项:去掉后缀后,要注意单词长度不能为0,否则不删参考代码:#include<stdio.h> #include<string.h> int main() { char a[3…… 题解列表 2023年10月25日 0 点赞 0 评论 188 浏览 评分:0.0