自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 2021-10-28

ehcarts自定义tooltips显示内容 tooltip: { trigger: 'axis', formatter: function (params) { var result = params[0].name + '<br>'; params.forEach(function (item) { if (item.value) { result += item.marker +

2021-10-28 10:42:08 143

原创 python文件读写原理的一些理解:r,r+,w,w+,a,a+,以及seek()方法

理解文件中的读取或者写入顺序要先知道对文件进行读写时它的工作模式:在python中对文件进行读写时,是依据文件中光标的位置进行读写的。 这里就要引入seek()方法: seek(offset, whence) offset – 开始的偏移量,也就是代表需要移动偏移的字节数 whence:可选,默认值为 0。给offset参数一个定义,表示要从哪个位置开始偏移;0代表从文件开头开始算起,1代表从当前...

2020-04-06 14:04:45 922 1

原创 python实现洛谷P1319 压缩技术

把每一行的0或1用bool值表示 List = list(map(int, input().split())) Count = 0 k = 1 Bool = False #因为矩阵内是0与1,所以我认为用bool类型方便点 while k < len(List): for i in range(0, List[k]): #List[k]存放0或1的连续次数 prin...

2020-03-26 20:37:42 870

原创 python洛谷P1317 低洼地

N = int(input()) groundHighList = list(map(int, input().split())) i = 1 j = i + 1 count = 0 while i < len(groundHighList) - 1:#头尾为0且不可能为低洼地 while j < len(groundHighList) and groundHighList[i...

2020-03-25 21:11:30 1181 1

原创 python实现洛谷P1179 数字统计

N, M = list(map(int, input().split())) List = list(map(int, input().split())) j = 0 count = 0 total = 0 for i in range(j, N): total += List[i] if total <= M: continue else: ...

2020-03-24 12:29:02 561 1

原创 python实现洛谷P1161 开灯

n = int(input()) List = [] for i in range(n): a, t = list(map(float, input().split())) List.append((a, t)) #把每次输入的a与t以元组的形式存在列表内 List1 = [0 for i in range(2000001)] #开灯为1,不开灯为0,范围是1~200...

2020-03-24 12:08:07 854

原创 python实现洛谷入门P1914 小书童——密码

def change(k, char): x = ord(char) + k #运用字符的ascii码计算,'a'为97,'z'为122 while x > ord('z'): #若x在 ord('a') 到 ord('z') 这个区间内,则符合题意,否则要继续计算 x = x - ord('z') + or...

2020-03-22 11:59:31 430

原创 Python实现洛谷P1200 [USACO1.1]你的飞碟在这儿Your Ride Is Here

第一种方法(运用字典): star = input() team = input() alphabet = {} Ascii = 65 for i in range(1, 27): #字典的key就是26个字母 key = chr(Ascii) #把ascii码转化为字母 alphabet[key] = i #题目要求'A' = 1 ...

2020-03-18 20:52:44 619

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除