python 线性筛法 摘要:解题思路:注意事项:参考代码:n=int(input()) ps=[True]*(n+1) p=[] for i in range(2,n+1): if ps[i]: …… 题解列表 2023年12月13日 0 点赞 0 评论 393 浏览 评分:9.9
python来解一下 摘要:解题思路:while True: try: s=list(map(int,input().split())) n,m,items=s[0],s[1],s[2:] a=[i for…… 题解列表 2023年12月13日 0 点赞 0 评论 215 浏览 评分:6.0
2827:计算多项式的导函数 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2023年12月13日 0 点赞 0 评论 274 浏览 评分:0.0
结构体之成绩记录,中规中矩 摘要:解题思路:注意事项:注意格式的输出参考代码:#include<stdio.h>int main(){ struct LC { char a[10]; char b[10]; int c[3]; …… 题解列表 2023年12月13日 0 点赞 0 评论 481 浏览 评分:0.0
编写题解 2990: 十进制到八进制 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;import java.math.BigInteger;public class Main { public st…… 题解列表 2023年12月13日 0 点赞 11 评论 360 浏览 评分:5.6
c代码记录之剔除相关数(不用指针感觉写的好麻烦,太多循环与排序) 摘要:整体思路: 1.将每个整数的每位数字从小到大排序好,便于整数比较或字符串比较(这里用的字符串比较) 2.创建二维字符串数组str,盛放排序好的整数串 3.创建一维数组num,盛放原数,下标和串数…… 题解列表 2023年12月13日 0 点赞 0 评论 232 浏览 评分:0.0
选择排序python 摘要:解题思路: 选择排序的时间复杂度是O(n^2),其中n是待排序元素的数量。这是因为选择排序的基本操作是交换和比较,而每次交换和比较都需要遍历整个数组,因此时间复杂度为O(n^2)题意直接…… 题解列表 2023年12月13日 0 点赞 0 评论 223 浏览 评分:0.0
2903: 不高兴的津津c语言题解 摘要:解题思路:设立二维数组存储数据,在输入后用数组day[7]存判断循环中的时长最多的那天,最后判断时长是否大于8,然后输出。注意事项:参考代码:#include<stdio.h>int main(){ …… 题解列表 2023年12月13日 0 点赞 0 评论 230 浏览 评分:9.9
跟我徐海东学,acm金牌你也行! 摘要:参考代码:#includelong long ans[29000000], n;int main(){ scanf("%lld", &n); ans[1] = n * 6; for(…… 题解列表 2023年12月13日 1 点赞 2 评论 414 浏览 评分:10.0
找规律解决时间超限 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ long long n; scanf("%lld",&n); long long a[3000…… 题解列表 2023年12月13日 0 点赞 0 评论 410 浏览 评分:9.9