超级楼梯(Python) 摘要:解题思路:注意事项:参考代码:def super_stair_ways(m): dp = [0] * (m + 1) dp[1] = 1 for i in range(2, m + …… 题解列表 2023年12月08日 0 点赞 0 评论 229 浏览 评分:0.0
移动路线(Python) 摘要:解题思路:注意事项:参考代码:def countRoutes(m, n): dp = [[0] * (n+1) for _ in range(m+1)] # 初始化边界条件 for …… 题解列表 2023年12月08日 0 点赞 0 评论 132 浏览 评分:0.0
输出格式的调整 摘要:1.除法的输出格式需要设置输出一位有效数字,用.1g表示2.前缀“+”表示在正数前面显示符号+,在负数前面显示符号-参考代码:#include<stdio.h> int main() { do…… 题解列表 2023年12月08日 0 点赞 0 评论 283 浏览 评分:0.0
解决输出全部因子的问题 摘要:解题思路:这道题还是很好搞定的,主要是输出格式上可能不同小伙伴有不同的想法,这里我用到了Java里面字符串的一个特征注意事项:内层循环只用到i/2即可,因为一个整数的因子不会大于他的1/2参考代码:p…… 题解列表 2023年12月08日 0 点赞 0 评论 132 浏览 评分:0.0
题解 2775: 等差数列末项计算 摘要:解题思路:注意事项:参考代码:##include<iostream>using namespace std;int main(){ int a,b,n,m; cin>>a>>b>>n; …… 题解列表 2023年12月08日 0 点赞 0 评论 174 浏览 评分:0.0
等差数列求解 摘要:解题思路:首先求通项,后遍历从1到n之间的每一个数,将这些数代入通项,求和注意事项:循环的起点是i=1,也要注意sum需要有初始值参考代码:#include<stdio.h>int main(){ i…… 题解列表 2023年12月08日 0 点赞 0 评论 150 浏览 评分:0.0
编写题解 2780: 奇偶数判断 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin>>a; if (a%2==0)…… 题解列表 2023年12月08日 0 点赞 0 评论 133 浏览 评分:0.0
去掉空格(c语言新题解) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include<string.h>int removeSpace(char s[]){ int count=0; i…… 题解列表 2023年12月08日 0 点赞 0 评论 140 浏览 评分:0.0
感觉不错的方法 摘要:解题思路:用布尔函数判断是否为素数注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a = 0; cin >>…… 题解列表 2023年12月09日 0 点赞 0 评论 212 浏览 评分:0.0
编写题解 1160: 出圈(队列) 摘要:解题思路:把m-1个数加到后面之后,删除第一个数即可注意事项:参考代码:while True: try: n,m = map(int,input().split()) …… 题解列表 2023年12月09日 1 点赞 0 评论 241 浏览 评分:0.0