六行简便 编写题解 1020: [编程入门]猴子吃桃的问题 摘要:解题思路:利用递归的思想注意事项:最后一天亦包括参考代码:n=int(input())s=1while n>1: s=(s+1)*2 n=n-1print(s)…… 题解列表 2024年04月17日 0 点赞 0 评论 160 浏览 评分:0.0
十行简便 有规律的数列求和 摘要:解题思路:利用列表的方式注意事项:注意两位小数参考代码:n=int(input())a=[2]b=[1]s=0for i in range(n): a.append(a[i]+b[i]) …… 题解列表 2024年04月17日 0 点赞 0 评论 179 浏览 评分:0.0
基础的递归组合输出 摘要:解题思路:1~n选择的排列数量r,递归可以用两个变量一个用于控制走,一个控制数量注意事项:采用的是框架写的:#include <bits/stdc++.h>using namespace std;#d…… 题解列表 2024年04月18日 0 点赞 0 评论 400 浏览 评分:0.0
基础的递归拆分输出 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;#define endl '\n'#define int long…… 题解列表 2024年04月18日 0 点赞 0 评论 214 浏览 评分:0.0
自定义函数处理最大公约数与最小公倍数 摘要:解题思路:注意事项:参考代码:def function(a, b): c = min(a, b) max_GCD = 0 for i in range(1, c + 1)…… 题解列表 2024年04月18日 0 点赞 0 评论 386 浏览 评分:0.0
自定义函数处理素数 摘要:解题思路:注意事项:参考代码:def function(x): for i in range(2, x): if x % i == 0: &nbs 题解列表 2024年04月18日 0 点赞 0 评论 712 浏览 评分:0.0
二维数组的转置 摘要:解题思路:注意事项:参考代码:def function(arr): list = [] for j in range(3): str = "" 题解列表 2024年04月18日 0 点赞 0 评论 327 浏览 评分:0.0
自定义函数之字符提取 摘要:解题思路:注意事项:参考代码:def function(x): aeiou = "aeiou" str = [] for i in x: if i 题解列表 2024年04月18日 0 点赞 0 评论 163 浏览 评分:0.0
自定义函数之数字分离 摘要:解题思路:注意事项:参考代码:def function(x): return print(' '.join(x)) if __name__ == '__main…… 题解列表 2024年04月18日 0 点赞 0 评论 179 浏览 评分:0.0
自定义函数之字符类型统计 摘要:解题思路:注意事项:参考代码:def function(x): a, b, c, d = 0, 0, 0, 0 for i in x: if i.isalpha(…… 题解列表 2024年04月18日 0 点赞 0 评论 341 浏览 评分:0.0