题解 1001: [编程入门]第一个HelloWorld程序(仅需一行) 摘要:解题思路:在Python中print打印结束后会自动换行(\n),因此只需写三次print即可。其次在Python中可以使用“字符串” * 次数,来表达重复的“字符串”。还有(\n)也是换行的意思。注…… 题解列表 2023年07月10日 1 点赞 0 评论 351 浏览 评分:0.0
1002: [编程入门]三个数最大值 (python代码) 摘要:方法一 a, b, c = map(int, input().strip().split()) sum=[a, b, c] sum.sort() print(sum[2]) …… 题解列表 2023年07月09日 0 点赞 0 评论 619 浏览 评分:0.0
[python] 1001: [编程入门]第一个HelloWorld程序 摘要:方法一: print("**************************") print("Hello World!") print("**********************…… 题解列表 2023年07月09日 0 点赞 0 评论 440 浏览 评分:0.0
1000: [竞赛入门]简单的a+b (python代码) 摘要: while True: #while True 语句中一定要有结束该循环的break语句,否则会一直循环下去的 try: #Python 中,用try except语句块捕获…… 题解列表 2023年07月09日 3 点赞 0 评论 1077 浏览 评分:8.0
反差法求解猴子吃桃问题——Python 摘要:解题思路:注意事项:参考代码:def caculate_peach_number(n): left_peaches = 1 day = n while day > 1: …… 题解列表 2023年07月08日 0 点赞 0 评论 471 浏览 评分:9.9
满分dfs(python) 摘要:解题思路:注意事项:参考代码:import functools n,m = map(int, input().split()) @functools.lru_cache(None) def df…… 题解列表 2023年07月07日 0 点赞 0 评论 349 浏览 评分: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 评论 537 浏览 评分:9.9
汽水题:较为标准的Python解法,参考了ChatGpt。 摘要:解题思路:注意事项:参考代码:def calculate_max_sodas(n): if n < 2: return 0 total_sodas = 0 remain…… 题解列表 2023年06月24日 0 点赞 0 评论 426 浏览 评分: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 评论 351 浏览 评分: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 评论 368 浏览 评分:0.0