![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
洛谷题目
Oligey Oligey
这个作者很懒,什么都没留下…
展开
-
python实现洛谷P1179 数字统计
N, M = list(map(int, input().split()))List = list(map(int, input().split()))j = 0count = 0total = 0for i in range(j, N): total += List[i] if total <= M: continue else: ...原创 2020-03-24 12:29:02 · 555 阅读 · 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 · 845 阅读 · 0 评论 -
Python实现洛谷P1200 [USACO1.1]你的飞碟在这儿Your Ride Is Here
第一种方法(运用字典):star = input() team = input()alphabet = {}Ascii = 65for i in range(1, 27): #字典的key就是26个字母 key = chr(Ascii) #把ascii码转化为字母 alphabet[key] = i #题目要求'A' = 1 ...原创 2020-03-18 20:52:44 · 597 阅读 · 0 评论