筛选N以内的所有素数 摘要:解题思路:枚举每一个数字,判断是否为素数。注意事项:0和1要做特殊判断它们是非素数参考代码:#include<stdio.h>int Is_Prime(int n){ int i; if(…… 题解列表 2023年03月06日 0 点赞 0 评论 236 浏览 评分:0.0
编写题解 2247: 蓝桥杯算法提高-输出三个整数的最大数(直接进行比较) 摘要:解题思路:直接进行比较注意事项:注意交换大小后的值参考代码:import java.util.Scanner;public class T2247 { public static void main(…… 题解列表 2023年03月06日 0 点赞 0 评论 283 浏览 评分:0.0
解法有很多,多思考进步才会大(简单解法) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,sum=0; scanf("%d",&a); //比如有4个小朋友分苹果,最小的…… 题解列表 2023年03月06日 0 点赞 0 评论 320 浏览 评分:0.0
bfs单点多次扩散问题(简称hp问题) 摘要:解题思路:注意事项:参考代码:# Python代码我还是补充一下八 def bfs(queue,step): for i in queue: x,y=i for j …… 题解列表 2023年03月06日 0 点赞 0 评论 310 浏览 评分:0.0
注意:两次相加 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n; scanf("%d",&n); int sn=0,a=2,aa=0; fo…… 题解列表 2023年03月06日 0 点赞 0 评论 298 浏览 评分:0.0
不要想太多,这样简单 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int max(int a,int b){ int s; s=a%b; while(s!=0) { …… 题解列表 2023年03月06日 0 点赞 6 评论 232 浏览 评分:0.0
2701————蓝桥杯2022年第十三届决赛真题-取模(C/C++/Java组) 摘要: import java.util.Scanner; public class Main { public static void main(String[] …… 题解列表 2023年03月06日 0 点赞 0 评论 507 浏览 评分:0.0
c语言题解c语言题解c语言题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#include<string.h>int main(){ long long i,j,n,p=0…… 题解列表 2023年03月06日 0 点赞 0 评论 446 浏览 评分:0.0
1229基础解法(Python) 摘要:解题思路:直接调用Python的math库函数即可注意事项:Python 3.9 以上版本可以直接调用math.lcm()函数,其他版本只有math.gcd()函数参考代码:from math imp…… 题解列表 2023年03月06日 0 点赞 0 评论 301 浏览 评分:0.0
1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:n = int(input()) a, b = 1, 0 for i in range(1,n+1): a *= i; b += a print(b)…… 题解列表 2023年03月07日 0 点赞 0 评论 325 浏览 评分:0.0