[python] 1001: [编程入门]第一个HelloWorld程序 摘要:方法一: print("**************************") print("Hello World!") print("**********************…… 题解列表 2023年07月09日 0 点赞 0 评论 471 浏览 评分:0.0
1000: [竞赛入门]简单的a+b (python代码) 摘要: while True: #while True 语句中一定要有结束该循环的break语句,否则会一直循环下去的 try: #Python 中,用try except语句块捕获…… 题解列表 2023年07月09日 3 点赞 0 评论 1138 浏览 评分:8.0
反差法求解猴子吃桃问题——Python 摘要:解题思路:注意事项:参考代码:def caculate_peach_number(n): left_peaches = 1 day = n while day > 1: …… 题解列表 2023年07月08日 0 点赞 0 评论 514 浏览 评分:9.9
满分dfs(python) 摘要:解题思路:注意事项:参考代码:import functools n,m = map(int, input().split()) @functools.lru_cache(None) def df…… 题解列表 2023年07月07日 0 点赞 0 评论 382 浏览 评分:0.0
很简单的python代码 摘要:解题思路:注意事项:参考代码:for i in range(2,1000): total_sum = 0 array1 = list(str(i)) for digit in arr…… 题解列表 2023年07月05日 0 点赞 0 评论 577 浏览 评分:9.9
汽水题:较为标准的Python解法,参考了ChatGpt。 摘要:解题思路:注意事项:参考代码:def calculate_max_sodas(n): if n < 2: return 0 total_sodas = 0 remain…… 题解列表 2023年06月24日 0 点赞 0 评论 480 浏览 评分: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 评论 392 浏览 评分: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 评论 413 浏览 评分:0.0
利用递归算法求解猴子吃桃问题 摘要:# 利用递归算法求解猴子吃桃问题 ## 我的代码 ```python from functools import lru_cache @lru_cache(maxsize=1024) #…… 题解列表 2023年06月12日 0 点赞 0 评论 446 浏览 评分:0.0
自由下落的距离计算 摘要: ## 我的代码 ```python m,n=map(int,input().strip().split()) a=0 b=m #这里将b的初值设为m,因为落下距离容易被忽略,也可以不写…… 题解列表 2023年06月11日 0 点赞 0 评论 405 浏览 评分:0.0