题解 1062: 公约公倍(简单循环) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,n; scanf("%d %d",&m,&n); for(int i=(m<n…… 题解列表 2023年12月08日 0 点赞 0 评论 406 浏览 评分:9.9
结构体之成绩统计2 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct Stu{ char id[20],name[20]; int score[3],total;};void in…… 题解列表 2023年12月08日 0 点赞 0 评论 461 浏览 评分:9.9
题解 2908: 白细胞计数 #includeusingnamespacestd;intmain(){intn;doubleo;floatnum=0,a[3000];cin>>n;for(inti=0;i>a[i];sort(a,a+n);for(inti=1;i 题解列表 2023年12月08日 0 点赞 0 评论 478 浏览 评分:0.0
大数据因子 带解题思路 摘要:解题思路:注意事项:参考代码:c = int(input()) #输入数据k = [2, 3, 4, 5, 6, 7, 8, 9] #定义K…… 题解列表 2023年12月08日 0 点赞 0 评论 628 浏览 评分:9.9
超级楼梯(Python) 摘要:解题思路:注意事项:参考代码:def super_stair_ways(m): dp = [0] * (m + 1) dp[1] = 1 for i in range(2, m + …… 题解列表 2023年12月08日 0 点赞 0 评论 577 浏览 评分:0.0
编写题解 2796: 求整数的和与均值 摘要:解题思路:注意事项: 此题需要考虑一行输入和多行输入的情况参考代码:list1 = list(map(int,input().rsplit()))n = list1[0]list1.pop(0)wh…… 题解列表 2023年12月08日 1 点赞 0 评论 1038 浏览 评分:8.4
编写题解 2794: 求平均年龄 解题思路:注意事项:需要注意多行输入的单行输入的情况参考代码:list1=list(map(int,input().rsplit()))n=list1[0]list1.pop(0)whilenotn<=len(list1):list1.extend(map(int, 题解列表 2023年12月08日 0 点赞 6 评论 1084 浏览 评分:7.3
移动路线(Python) 摘要:解题思路:注意事项:参考代码:def countRoutes(m, n): dp = [[0] * (n+1) for _ in range(m+1)] # 初始化边界条件 for …… 题解列表 2023年12月08日 1 点赞 0 评论 458 浏览 评分:0.0
参考01背包 摘要:解题思路:容量换成甜度注意事项:只有一个值(甜度),只需要算对应格参考代码:#include<stdio.h>int main(){ int n,dp[100]={0},a,v; scan…… 题解列表 2023年12月08日 0 点赞 0 评论 707 浏览 评分:8.0
自定义函数之数字后移(Java代码) importjava.util.Scanner;publicclassL1046{publicstaticvoidmain(String[]args){/*有n个整数,使前面各数顺序向后移m个位置,最后m个数变成前面m个数。写一函数:实现以上功能,在主函数中输入n个数和输出调整后的n个数。 题解列表 2023年12月08日 0 点赞 0 评论 571 浏览 评分:9.9