上一页 1 2 3 4 5 6 ··· 14 下一页
摘要: /* Migrated from Lutece 1888 跳水打分问题 Description 运动员跳水时,有n个评委打分,分数为10分制,且有两位小数。得分规则为:去掉最高分和最低分,求剩下分数的平均值,就是运动员的最终得分。 Input 有多组测试数据。第一行是整数T (T <= 100),表 阅读全文
posted @ 2025-03-12 19:10 Kazuma_124 阅读(1) 评论(0) 推荐(0) 编辑
摘要: /* Migrated from Lutece 1886 中间数 Description 从标准输入设备读入三个整数a、b、c,找出中间数并输出。 中间数定义为: 若三数不相等,则第2大的数是中间数;若有两个数相等,则最大数作为中间数。 Input 第一行是T(T<=10),表明后面有T组测试数据, 阅读全文
posted @ 2025-03-12 19:09 Kazuma_124 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ''' RGB To Hex Conversion https://www.codewars.com/kata/513e08acc600c94f01000001/train/python 255, 255, 255 --> "FFFFFF" 255, 255, 300 --> "FFFFFF" 0, 阅读全文
posted @ 2025-03-07 20:36 Kazuma_124 阅读(1) 评论(0) 推荐(0) 编辑
摘要: # codewars,Calculating with Functions ''' seven(times(five())) # must return 35 four(plus(nine())) # must return 13 eight(minus(three())) # must retur 阅读全文
posted @ 2025-03-07 20:35 Kazuma_124 阅读(2) 评论(0) 推荐(0) 编辑
摘要: # https://www.codewars.com/kata/51ba717bb08c1cd60f00002f/solutions/python?filter=all&sort=best_practice&invalids=false # Range Extraction def solution 阅读全文
posted @ 2025-03-07 20:34 Kazuma_124 阅读(1) 评论(0) 推荐(0) 编辑
摘要: ''' codewars,Tic-Tac-Toe Checker,525caa5c1bf619d28c000335 ''' def is_solved(board): isFull = True for i in range(3): if board[i][0]==0 or board[i][1]= 阅读全文
posted @ 2025-03-07 20:34 Kazuma_124 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ''' The observed PIN,https://www.codewars.com/kata/5263c6999e0f40dee200059d/train/python ''' def get_pins(observed): adjacent = { '0' : '08', # 0 '1' 阅读全文
posted @ 2025-03-07 20:33 Kazuma_124 阅读(1) 评论(0) 推荐(0) 编辑
摘要: # Sum of Intervals # https://www.codewars.com/kata/52b7ed099cdc285c300001cd/train/python def sum_of_intervals(intervals): intervals.sort(key = lambda 阅读全文
posted @ 2025-03-07 20:33 Kazuma_124 阅读(1) 评论(0) 推荐(0) 编辑
摘要: # Strings Mix # https://www.codewars.com/kata/5629db57620258aa9d000014 def mix(s1, s2): s1 = ''.join([c for c in s1 if c.islower()]) # [c for c in s1 阅读全文
posted @ 2025-03-07 20:32 Kazuma_124 阅读(2) 评论(0) 推荐(0) 编辑
摘要: # Roman Numerals Helper # https://www.codewars.com/kata/51b66044bce5799a7f000003/train/python class RomanNumerals: # @staticmethod 是一个装饰器, 用来标识一个方法为静态 阅读全文
posted @ 2025-03-07 20:32 Kazuma_124 阅读(3) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 14 下一页
点击右上角即可分享
微信分享提示