上车人数 (C语言代码) 摘要:解题思路:根据题目: x站后车上的人数 = (x-1)站后车上的人数 + x 站上车人数 - x站下车人数构造三个函数:int shangche(int a,int n,int dier…… 题解列表 2018年01月18日 0 点赞 0 评论 1444 浏览 评分:0.0
上车人数 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int add(int a,int n,int Y){ if(n==1) return a; else if(n==2) r…… 题解列表 2017年09月08日 0 点赞 0 评论 2053 浏览 评分:0.0
穷举法,注意边界的细节问题 摘要:解题思路:注意事项:参考代码:import java.util.Scanner; public class Main { public static void main(String[…… 题解列表 2024年03月13日 0 点赞 0 评论 325 浏览 评分:0.0
上车人数(模拟 + 递推) 摘要:解题思路:递推系数规律, 计算第二站上下车人数, 按照递推公式计算第x站人数注意事项:第n站下车的人数是第n-1站出发时的人数参考代码:#include<iostream>#inclu…… 题解列表 2025年01月21日 0 点赞 0 评论 281 浏览 评分:0.0
平行数组+递推 摘要:1.实在是不会找规律哈但是会模拟递归过程 反正计算是编译器的问题 关我程序设计什么事2.嵌套递归 具体表现是 n>=3:(1) An=A(n-1)+(up)A(n-2)(up这里表示上车人…… 题解列表 2025年04月06日 0 点赞 0 评论 231 浏览 评分:0.0
斐波那契解决人数问题 摘要:解题思路: 设第二站的上车人数为x,通过列表个的方法找出x的系数和常数项,通过两个二维数组来记录每一站的上车人数和发车人数,求出关于倒数第二站的方程, &nbs…… 题解列表 2026年01月06日 0 点赞 0 评论 78 浏览 评分:0.0
上车人数 (C语言代码) 摘要:解题思路:关键是求出第二站上车的人数注意事项:参考代码:#include <stdio.h>int E(int n, int b, int a);int F(int n);int D(int n);i…… 题解列表 2017年12月01日 1 点赞 0 评论 1754 浏览 评分:0.0
编写题解 1179: 上车人数 摘要:解题思路:注意事项:参考代码:a,n,m,x=map(int,input().split()) up=[a] def get(a,x,z): up=[a,x] down=[0,…… 题解列表 2022年02月18日 0 点赞 0 评论 496 浏览 评分:0.0
题解 1179: 上车人数 摘要:参考代码:#include <stdio.h>#include <stdlib.h>#include<math.h>int main(){ int a,n,m,x; scanf("%d%d…… 题解列表 2021年05月06日 0 点赞 0 评论 370 浏览 评分:0.0