
PAT(Advanced Level) Practice
文章平均质量分 71
解题笔记
Fiona-Dong
这个作者很懒,什么都没留下…
展开
-
1006 Sign In and Sign Out (25 分)
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 ones who have unlocked and loc转载 2021-11-28 09:17:47 · 121 阅读 · 0 评论 -
1007 Maximum Subsequence Sum (25 分)
Given a sequence of K integers { N1,N2,...,NkN_1,N_2,...,N_kN1,N2,...,Nk }. A continuous subsequence is defined to be { Ni,Ni+1,...,NjN_i,N_{i+1},...,N_jNi,Ni+1,...,Nj } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has t转载 2021-11-15 20:08:44 · 77 阅读 · 0 评论 -
1015 Reversible Primes (20 分)
A reversible prime in any number system is a prime whose “reverse” in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a prime.Now given any two positive integers N (<10510^51转载 2021-11-14 16:08:37 · 73 阅读 · 0 评论 -
1011 World Cup Betting (20 分)
With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Similarly, football betting fans were putting their money转载 2021-11-14 16:08:08 · 86 阅读 · 0 评论 -
1008 Elevator (20 分)2021-11-01
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-11-07 09:49:45 · 90 阅读 · 0 评论 -
1005 Spell It Right (20 分)
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 (≤1010010^{10原创 2021-10-31 16:25:52 · 85 阅读 · 0 评论 -
1001 A+B Format (20 分)2021-10-27
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 of i转载 2021-10-31 16:25:29 · 71 阅读 · 0 评论