ZimingYang
ZimingYang
全部文章
分类
归档
标签
去牛客网
登录
/
注册
ZimingYang的博客
全部文章
(共4篇)
题解 | #HJ42.学英语#
做完这题就真的“学”英语了。很多数字的英语单词一拼就错,比如: 14: fourteen. 40: forty. 15: fifteen, 50: fifty. keyword = {100:"hundred", 1000:"thousand",&nb...
Python3
字符串
哈希表
2022-09-11
1
442
题解 | #HJ19.简单错误记录#
python3 collections.Counter 可以更新元素值不会改变键的位置,直接输出倒数8个元素 from collections import Counter import sys errors = Counter(...
Python3
字符串
2022-08-27
2
408
题解 | 【模拟】#HJ25数据分类处理#
严格来说应该是简单或者中等题。 注意两点: 1. set()会改变顺序,所以要sorted(set()) 2. insert(index, obj),参数顺序易记反 3. 多用辅助变量,比2023届各大大厂的笔试题简单多 import sys line1&nb...
Python3
数组
2022-08-26
0
534
题解 | #路灯#
注意检查边界的coords[0]-0 和 l-coords[-1] while True: try: n, l = list(map(int, input().split())) coords = list(map(int, input().split()))...
Python3
2022-08-11
0
362