![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT考试
文章平均质量分 66
5:00am ⁶
这个作者很懒,什么都没留下…
展开
-
PAT甲级-1046 Shortest Distance
The task is really simple: given N exits on a highway which forms a simple cycle, you are supposed to tell the shortest distance between any pair of exits.Input Specification:Each input file contains one test case. For each case, the first line contains原创 2021-08-12 17:39:07 · 85 阅读 · 0 评论 -
PAT甲级-1042 Shuffling Machine
Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak, and in order to avoid “inside jobs” where employees collaborate with gamblers by performing inadequate shuffles, many casinos employ原创 2021-08-12 17:06:52 · 97 阅读 · 0 评论 -
PAT甲级-1041 Be Unique
Being unique is so important to people on Mars that even their lottery is designed in a unique way. The rule of winning is simple: one bets on a number chosen from [1,10^4]. The first one who bets on a unique number wins. For example, if there are 7 people原创 2021-08-12 16:25:11 · 82 阅读 · 0 评论 -
PAT甲级-1035 Password
To prepare for PAT, the judge sometimes has to generate random passwords for the users. The problem is that there are always some confusing passwords since it is hard to distinguish 1 (one) from l (L in lowercase), or 0 (zero) from O (o in uppercase). One原创 2021-08-12 16:07:45 · 102 阅读 · 0 评论 -
PAT甲级-1031 Hello World for U
Given any string of N (≥5) characters, you are asked to form the characters into the shape of U. For example, helloworld can be printed as:h de ll rlowoThat is, the characters must be printed in the original order, starting top-down from the原创 2021-08-12 15:28:40 · 106 阅读 · 0 评论 -
PAT甲级-1027 Colors in Mars
People in Mars represent the colors in their computers in a similar way as the Earth people. That is, a color is represented by a 6-digit number, where the first 2 digits are for Red, the middle 2 digits for Green, and the last 2 digits for Blue. The only原创 2021-08-12 15:04:05 · 117 阅读 · 0 评论 -
PAT甲级-1023 Have Fun with Numbers
Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 246913578, which happens to be another 9-digit number consisting exactly the numbers from 1 to 9, only in a diffe原创 2021-08-12 13:37:53 · 63 阅读 · 0 评论 -
PAT甲级-1019 General Palindromic Number
A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number. All single digit numbers are palindromic numbers.Although palindromic numbers are most often considered原创 2021-08-12 11:16:58 · 70 阅读 · 0 评论 -
PAT甲级-1015 Reversible Primes
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(<10^5) and原创 2021-08-12 10:51:56 · 52 阅读 · 0 评论 -
PAT甲级-1011 World Cup Betting
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-08-12 10:10:53 · 70 阅读 · 0 评论 -
PAT甲级-1008 Elevator
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-08-11 16:59:34 · 76 阅读 · 0 评论 -
PAT甲级-1005 Spell It Right
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-08-11 16:29:42 · 97 阅读 · 0 评论 -
PAT甲级-1001 A+B Format
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-08-11 15:57:23 · 64 阅读 · 0 评论