筛选N以内的素数 python 摘要:解题思路:注意事项:参考代码:n=int(input())tag=0for i in range(2,n+1): if i>2: for j in range(2,i): …… 题解列表 2024年10月28日 0 点赞 0 评论 252 浏览 评分:0.0
猴子吃桃的问题python 摘要:解题思路:注意事项:参考代码:n=int(input())num=1for i in range(1,n): num=2*(num+1)print(num)…… 题解列表 2024年10月28日 0 点赞 0 评论 189 浏览 评分:0.0
1738: 排序 -希尔排序 摘要:**注意输入输出** ```python # 希尔排序 def shell_sort(nums): # 间隙初始为数组长度的一半 gap = len(nums) // 2 …… 题解列表 2024年10月28日 0 点赞 0 评论 414 浏览 评分:0.0
用函数来完成甲流病人初筛 摘要:解题思路:先定义用于筛选的函数体,再在主函数中进行调用注意事项:函数体中,数值是不能够直接进行传递的,如果想传递到主函数中,要用指针参考代码:#include <stdio.h> voi…… 题解列表 2024年10月27日 0 点赞 0 评论 250 浏览 评分:9.9
1038: [编程入门]宏定义练习之三角形面积 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<math.h>#define F(a,b,c) S=(a+b+c)/2#define P(a,b,c) area=sq…… 题解列表 2024年10月27日 2 点赞 0 评论 967 浏览 评分:10.0
1738: 排序 -插入排序 摘要:注意事项: 注意输入输出参考代码:# 插入排序_升序 def insertion_sort(nums): # 遍历数组 for i in range(1, len(nums)):…… 题解列表 2024年10月27日 0 点赞 0 评论 398 浏览 评分:0.0
1738: 排序 -选择排序 摘要:注意事项:注意输入输出格式参考代码:def selection_sort(nums): length = len(nums) for i in range(length): …… 题解列表 2024年10月27日 0 点赞 0 评论 298 浏览 评分:0.0
1025 数组插入处理 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#define N 9 void insert(int* arr,int n,int value) //定义一个插入…… 题解列表 2024年10月27日 0 点赞 0 评论 179 浏览 评分:9.9
编写题解 1078: Repairing a Road 摘要:解题思路:注意事项:要用#include<iomanip>#include<cstring>#include<cmath>#include<algorithm>c++文件头参考代码:#include<…… 题解列表 2024年10月27日 0 点赞 0 评论 254 浏览 评分:9.9
Java快速幂BigInteger 摘要:参考代码:import java.math.BigInteger; import java.util.Scanner; public class Main{ public static …… 题解列表 2024年10月27日 1 点赞 0 评论 396 浏览 评分:0.0