题解列表

筛选

python 线性筛法

摘要:解题思路:注意事项:参考代码:n=int(input()) ps=[True]*(n+1) p=[] for i in range(2,n+1):     if ps[i]:        ……

python来解一下

摘要:解题思路:while True: try: s=list(map(int,input().split())) n,m,items=s[0],s[1],s[2:] a=[i for……

2827:计算多项式的导函数

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {    public static void main(String[] args……

选择排序python

摘要:解题思路:        选择排序的时间复杂度是O(n^2),其中n是待排序元素的数量。这是因为选择排序的基本操作是交换和比较,而每次交换和比较都需要遍历整个数组,因此时间复杂度为O(n^2)题意直接……

2903: 不高兴的津津c语言题解

摘要:解题思路:设立二维数组存储数据,在输入后用数组day[7]存判断循环中的时长最多的那天,最后判断时长是否大于8,然后输出。注意事项:参考代码:#include<stdio.h>int main(){ ……

找规律解决时间超限

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){    long long n;    scanf("%lld",&n);    long long a[3000……