Python
「已注销」
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
PAT (Advanced Level) Practice 1018 Public Bike Management(Python)## 未AC,测试点7错误,测试点9超时。
原题传送门代码# 输入数据line = input().strip().split()c, n, s, m = [int(x) for x in line]line = input().strip().split()bikes = [float('inf')]for i in range(len(line)): bikes.append(int(line[i]) - c / 2)roads = [{} for _ in range(n + 1)]for i in range(m):原创 2020-08-07 16:14:41 · 457 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1017 Queueing at Bank(Python)
class Customer: def __init__(self, coming, cost): self.coming = coming # 到来时间 self.cost = cost # 花费时间 self.start = 0 # 开始服务时间 def get_difference(self): return self.start - self.comingdef main(): line = inp原创 2020-08-05 16:19:55 · 198 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1010 Radix(Python)
程序员入门水平,贴出代码大家一起进步!原题传送门题目Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive integersN1 and N2N_1\;and\;N_2原创 2020-07-26 09:44:48 · 200 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1009 Product of Polynomials(Python)
程序员入门水平,贴出代码大家一起进步!原题传送门题目This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial:K N1原创 2020-07-24 19:03:55 · 226 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1007 Maximum Subsequence Sum(Python)
程序员入门水平,贴出代码大家一起进步!原题传送门题目Given a sequence of K integers { N1 , N2 , …, NK }. A continuous subsequence is defined to be { Ni, Ni+1 , …, Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of i原创 2020-07-08 21:43:34 · 244 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1006 Sign In and Sign Out (Python)
程序员入门水平,贴出代码大家一起进步!原题传送门题目At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in’s and out’s, you are supposed to find the o原创 2020-07-08 15:00:00 · 239 阅读 · 0 评论 -
PAT (Advanced Level) Practice 1005 Spell It Right (Python)
程序员入门水平,贴出代码大家一起进步!题目Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Each case occupies one line which cont原创 2020-07-08 10:59:04 · 226 阅读 · 0 评论 -
PAT (Advanced Level) 1004 Counting Leaves(Python)
这里写目录标题一级目录二级目录三级目录一级目录二级目录三级目录原创 2020-07-08 10:08:14 · 253 阅读 · 1 评论
分享