鱼C论坛

 找回密码
 立即注册
分享 信竞手感回升
tommyyu 2025-5-17 21:45
一年没碰信竞了,今天偷偷试着做了道题,一年前至少提交了5遍都 WA ,今天一做就 AC 了;包括化竞的做题手感也在最近这几个月回去学 whk 的时候提升了。有时候学习或许需要放松放松再接着学 但中考完就没什么时间放松了 :( 竞赛牲一年唯二的假期都只有一两周
3 个评论
分享 2025年5月11日
gainer 2025-5-11 17:45
学习进展缓慢 翻译 搜索 复制 学完了067讲 作业还没做完 距离085讲还有好远
0 个评论
分享 二检
tommyyu 2025-5-10 12:17
二检考完了,难度逆天
0 个评论
分享 找出包含特定键值对的对象
hayeee 2025-4-22 04:42
找出包含特定键值对的对象 Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching name and value pairs (second argument). Each name and value pair of the source object has to be present in the object from the collection if ...
0 个评论
分享 四种方法写费波纳希数列(第四种用yield)
Maliaty 2025-4-4 12:09
def fib (n,computed={ 1 : 1 , 2 : 1 }): if n in computed: return computed computed =fib(n- 1 ,computed)+fib(n- 2 ,computed) return computed fib_list= print (fib_list) def fibonacci (n): fib_list = # 初始化前两项 for _ in range (n - 2 ...
1 次阅读|0 个评论
分享 2025-03-30
Maliaty 2025-3-30 21:50
shopping_list = {} # 添加功能 def adds(): while True: name = input("请输入商品名称:").strip() if not name: print("亲,商品名称不能为空哦~") & ...
0 个评论
分享 利用字典容器,完成对于每个学生成绩数据的储存;在此基础上,按照总分从高到低的学生 ...
Maliaty 2025-3-27 16:40
# 定义学生成绩数据 students = # 计算每个学生的总分并存入字典 for student in students: student = student + student + student # 1. 按总分从高到低排序 students_sorted_high = sorted(students, key=lambda x: x , reverse=True) # 2. 按总分从低到高排序 students_sorted_lo ...
1 个评论
分享 统计字符出现次数,不要用dict
Maliaty 2025-3-27 15:48
s = "Hello World" #1. 统计字符出现次数 char_count = {} for char in s: if char in char_count : char_count += 1 else : char_count = 1 for char,count in char_count.items(): print ( f"' { char } ': { count } " ) # 不一定非要字典 #2. ...
0 个评论

本页有 2 篇日志因作者的隐私设置或未通过审核而隐藏

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-5-25 06:36

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

返回顶部