题解列表

筛选

移动路线(Python)

摘要:解题思路:注意事项:参考代码:def countRoutes(m, n):    dp = [[0] * (n+1) for _ in range(m+1)]    # 初始化边界条件    for ……

编写题解 2794: 求平均年龄

解题思路:注意事项:需要注意多行输入的单行输入的情况参考代码:list1=list(map(int,input().rsplit()))n=list1[0]list1.pop(0)whilenotn<=len(list1):list1.extend(map(int,

编写题解 2796: 求整数的和与均值

摘要:解题思路:注意事项:  此题需要考虑一行输入和多行输入的情况参考代码:list1 = list(map(int,input().rsplit()))n = list1[0]list1.pop(0)wh……

超级楼梯(Python)

摘要:解题思路:注意事项:参考代码:def super_stair_ways(m):    dp = [0] * (m + 1)    dp[1] = 1    for i in range(2, m + ……

大数据因子 带解题思路

摘要:解题思路:注意事项:参考代码:c = int(input())                       #输入数据k = [2, 3, 4, 5, 6, 7, 8, 9]         #定义K……

题解 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

结构体之成绩统计2

摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct Stu{    char id[20],name[20];    int score[3],total;};void in……

Pell数列(Python)

摘要:解题思路:注意事项:参考代码:def pell_number(k):    a, b = 1, 2    if k == 1:        return 1    elif k == 2:     ……

C语言课后习题

摘要:解题思路:用m,n相互替换一下,当然你也可以只用一个n从0到9再从9到0注意事项:参考代码:#include<stdio.h>int main(){    int n,m;    int arr[10……