PAT
文章平均质量分 52
喝牛奶的草履虫
这个作者很懒,什么都没留下…
展开
-
[PAT] 1008 Elevator (20 分) python解法
The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 seconds to move the elevator up one floor, and 4 seconds to原创 2021-02-20 20:35:22 · 140 阅读 · 0 评论 -
[PAT] 1005 Spell It Right (20 分) 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 contains an N (≤10^100). Ou原创 2021-02-20 20:24:51 · 104 阅读 · 0 评论 -
[PAT] 1034 Head of a Gang python解法
One way that the police finds the head of a gang is to check people’s phone calls. If there is a phone call between A and B, we say that A and B is related. The weight of a relation is defined to be the total time length of all the phone calls made between原创 2021-02-17 21:08:13 · 90 阅读 · 1 评论 -
[PAT] 1001 A+B Format python解法
题目: Calculate a+b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less than four digits). Input Specification: Each input file contains one test case. Each case contains a pair原创 2021-02-17 20:59:14 · 80 阅读 · 0 评论