题解列表
Pell数列(Python)
摘要:解题思路:注意事项:参考代码:def pell_number(k): a, b = 1, 2 if k == 1: return 1 elif k == 2: ……
题解 2908: 白细胞计数
摘要: #include
using namespace std;
int main(){
int n;
double o;
……
超级楼梯(Python)
摘要:解题思路:注意事项:参考代码:def super_stair_ways(m): dp = [0] * (m + 1) dp[1] = 1 for i in range(2, m + ……
移动路线(Python)
摘要:解题思路:注意事项:参考代码:def countRoutes(m, n): dp = [[0] * (n+1) for _ in range(m+1)] # 初始化边界条件 for ……
解决输出全部因子的问题
摘要:解题思路:这道题还是很好搞定的,主要是输出格式上可能不同小伙伴有不同的想法,这里我用到了Java里面字符串的一个特征注意事项:内层循环只用到i/2即可,因为一个整数的因子不会大于他的1/2参考代码:p……
题解 2775: 等差数列末项计算
摘要:解题思路:注意事项:参考代码:##include<iostream>using namespace std;int main(){ int a,b,n,m; cin>>a>>b>>n; ……
编写题解 2780: 奇偶数判断
摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin>>a; if (a%2==0)……