很简单的python代码 摘要:解题思路:注意事项:参考代码:for i in range(2,1000): total_sum = 0 array1 = list(str(i)) for digit in arr…… 题解列表 2023年07月05日 0 点赞 0 评论 681 浏览 评分:9.9
汽水题:较为标准的Python解法,参考了ChatGpt。 摘要:解题思路:注意事项:参考代码:def calculate_max_sodas(n): if n < 2: return 0 total_sodas = 0 remain…… 题解列表 2023年06月24日 0 点赞 0 评论 603 浏览 评分:9.9
筛选N以内的素数 摘要:```python x=list(map(int,input().split())) t=0 for i in range(10): min=i for j in ran…… 题解列表 2023年06月12日 0 点赞 0 评论 487 浏览 评分:0.0
筛选N以内的素数 摘要: #我的代码 ```python num = int(input()) list = [] for i in range(2,num+1): for j in range(2,…… 题解列表 2023年06月12日 0 点赞 0 评论 478 浏览 评分:0.0
利用递归算法求解猴子吃桃问题 摘要:# 利用递归算法求解猴子吃桃问题 ## 我的代码 ```python from functools import lru_cache @lru_cache(maxsize=1024) #…… 题解列表 2023年06月12日 0 点赞 0 评论 514 浏览 评分:0.0
自由下落的距离计算 摘要: ## 我的代码 ```python m,n=map(int,input().strip().split()) a=0 b=m #这里将b的初值设为m,因为落下距离容易被忽略,也可以不写…… 题解列表 2023年06月11日 0 点赞 0 评论 483 浏览 评分:0.0
利用递归函数求斐波那契数列 摘要: ##我的代码 ```python def func(n): if n==1: return 1 if n==2: return 2 …… 题解列表 2023年06月11日 0 点赞 0 评论 443 浏览 评分:0.0
求水仙花数 摘要:预览,如果感觉基本编辑界面太小太窄也可以使用全屏。** ##### 插入代码 x=y=z=d=0 for i in range(100,1000): x=i//100 y…… 题解列表 2023年06月11日 0 点赞 0 评论 453 浏览 评分:0.0
优质题解 利用三个for循环实现题目要求 摘要:# MarkDown编辑器基本使用说明 **如果这是您第一次使用MarkDown编辑器,建议先阅读这篇文章了解一下Markdown的基本使用方法。** ## 实时预览、全屏显示 ![…… 题解列表 2023年06月11日 0 点赞 0 评论 1011 浏览 评分:5.3
2832: 第n小的质数 摘要:解题思路:注意事项:参考代码:def isPrime(su): if su==2: return true if su%2==0: return False …… 题解列表 2023年06月11日 0 点赞 0 评论 454 浏览 评分:0.0