PAT-Advanced(甲级)
文章平均质量分 61
Ecloss
知行合一,凡事皆在事上练
展开
-
PAT:A1073 Scientific Notation (20 分)
PAT:A1073 Scientific Notation (20 分)Scientific notation is the way that scientists easily handle very large numbers or very small numbers. The notation matches the regular expression [+-][1-9].[0-9]...原创 2018-09-28 09:14:04 · 179 阅读 · 0 评论 -
PAT:A1075 PAT Judge (25 分)
PAT:A1075 PAT Judge (25 分)The ranklist of PAT is generated from the status list, which shows the scores of the submissions. This time you are supposed to generate the ranklist for PAT.Input Specif...原创 2018-09-18 09:51:37 · 313 阅读 · 0 评论 -
PAT:A1070 Mooncake (25 分)
PAT:A1070 Mooncake (25 分)Mooncake is a Chinese bakery product traditionally eaten during the Mid-Autumn Festival. Many types of fillings and crusts can be found in traditional mooncakes according to...原创 2018-09-18 09:51:53 · 295 阅读 · 0 评论 -
PAT:A1069 The Black Hole of Numbers (20 分)
PAT:A1069 The Black Hole of Numbers (20 分)For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing ...原创 2018-09-18 09:52:07 · 154 阅读 · 0 评论 -
PAT:A1065 A+B and C (64bit) (20 分)
PAT:A1065 A+B and C (64bit) (20 分)Given three integers A, B and C in [−263,263], you are supposed to tell whether A+B>C.Input Specification:The first line of the input gives the positiv...原创 2018-09-18 09:52:18 · 393 阅读 · 0 评论 -
PAT:A1061 Dating (20 分)
PAT:A1061 Dating (20 分)Sherlock Holmes received a note with some strange strings: Let's date! 3485djDkxh4hhGE 2984akDfkkkkggEdsb s&hgsfdk d&Hyscvnm. It took him only a minute to figure out t...原创 2018-09-18 09:52:27 · 219 阅读 · 0 评论 -
PAT:A1059 Prime Factors (25 分)
PAT:A1059 Prime Factors (25 分)Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1k1×p2k2×⋯×pmkm.Input Sp...原创 2018-09-18 09:52:47 · 201 阅读 · 0 评论 -
PAT:A1058 A+B in Hogwarts (20 分)
PAT:A1058 A+B in Hogwarts (20 分)If you are a fan of Harry Potter, you would know the world of magic has its own currency system -- as Hagrid explained it to Harry, "Seventeen silver Sickles to a Gal...原创 2018-09-18 09:54:08 · 326 阅读 · 0 评论 -
PAT:A1055 The World's Richest (25 分)
PAT:A1055 The World's Richest (25 分)Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this ...原创 2018-09-18 09:54:24 · 314 阅读 · 0 评论 -
PAT:A1050 String Subtraction (20 分)
PAT:A1050 String Subtraction (20 分)Given two strings S1 and S2, S=S1−S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to ...原创 2018-09-12 17:00:13 · 177 阅读 · 0 评论 -
PAT:A1078 Hashing (25 分)
PAT:A1078 Hashing (25 分)The task of this problem is simple: insert a sequence of distinct positive integers into a hash table, and output the positions of the input numbers. The hash function is def...原创 2018-09-17 22:20:48 · 331 阅读 · 0 评论 -
PAT:A1081 Rational Sum (20 分)
PAT:A1081 Rational Sum (20 分)Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum.Input Specification:Each input file contains one test case. Each ...原创 2018-09-17 22:20:38 · 214 阅读 · 0 评论 -
PAT:A1083 List Grades (25 分)
PAT:A1083 List Grades (25 分)Given a list of N student records with name, ID and grade. You are supposed to sort the records with respect to the grade in non-increasing order, and output those studen...原创 2018-09-17 22:20:28 · 206 阅读 · 0 评论 -
PAT:A1019 General Palindromic Number (20 分)
PAT:A1019 General Palindromic Number (20 分)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...原创 2018-09-26 20:54:37 · 305 阅读 · 0 评论 -
PAT:A1042 Shuffling Machine (20 分)
PAT:A1042 Shuffling Machine (20 分)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" wher...原创 2018-09-19 21:24:27 · 293 阅读 · 0 评论 -
PAT-Advanced Level(甲级)目录
PAT-Advanced Level(甲级)目录 A1001: PAT:A1001 A+B Format (20 分)A1002: PAT:A1002 A+B for Polynomials (25 分)A1005: PAT:A1005 Spell It RightA1006: PAT:A1006 Sign In and Sign Out (25 分)A1008: PAT...原创 2018-09-17 22:18:51 · 482 阅读 · 0 评论 -
PAT:A1104 Sum of Number Segments (20 分)
PAT:A1104 Sum of Number Segments (20 分)Given a sequence of positive numbers, a segment is defined to be a consecutive subsequence. For example, given the sequence { 0.1, 0.2, 0.3, 0.4 }, we have 10 ...原创 2018-09-17 22:19:05 · 191 阅读 · 0 评论 -
PAT:A1096 Consecutive Factors (20 分)
PAT:A1096 Consecutive Factors (20 分)Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, and 7 are the...原创 2018-09-17 22:19:23 · 252 阅读 · 0 评论 -
PAT:A1092 To Buy or Not to Buy (20 分)
PAT:A1092 To Buy or Not to Buy (20 分)Eva would like to make a string of beads with her favorite colors so she went to a small shop to buy some beads. There were many colorful strings of beads. Howev...原创 2018-09-17 22:19:36 · 232 阅读 · 0 评论 -
PAT:A1088 Rational Arithmetic (20 分)
PAT:A1088 Rational Arithmetic (20 分)For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient.Input Specification...原创 2018-09-17 22:19:50 · 245 阅读 · 0 评论 -
PAT:A1085 Perfect Sequence (25 分)
PAT:A1085 Perfect Sequence (25 分)Given a sequence of positive integers and another positive integer p. The sequence is said to be a perfect sequence if M≤m×p where Mand m are the maximum and minimum...原创 2018-09-17 22:20:03 · 236 阅读 · 0 评论 -
PAT:A1084 Broken Keyboard (20 分)
PAT:A1084 Broken Keyboard (20 分)On a broken keyboard, some of the keys are worn out. So when you type some sentences, the characters corresponding to those keys will not appear on screen.Now given...原创 2018-09-17 22:20:15 · 202 阅读 · 0 评论 -
PAT:A1049 Counting Ones (30 分)
PAT:A1049 Counting Ones (30 分)The task is simple: given any positive integer N, you are supposed to count the total number of 1's in the decimal form of the integers from 1 to N. For example, given ...原创 2018-09-12 16:59:29 · 325 阅读 · 0 评论 -
PAT:A1048 Find Coins (25 分)
PAT:A1048 Find Coins (25 分)Eva loves to collect coins from all over the universe, including some other planets like Mars. One day she visited a universal shopping mall which could accept all kinds o...原创 2018-09-12 16:58:41 · 168 阅读 · 0 评论 -
PAT:A1023 Have Fun with Numbers (20 分)
PAT:A1023 Have Fun with Numbers (20 分)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 ...原创 2018-08-21 10:15:35 · 268 阅读 · 0 评论 -
PAT:A1012 The Best Rank (25 分)
PAT:A1012 The Best Rank (25 分)To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus...原创 2018-08-20 09:23:47 · 775 阅读 · 0 评论 -
PAT:A1011 World Cup Betting (20 分)
PAT:A1011 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 ...原创 2018-08-20 09:22:54 · 511 阅读 · 0 评论 -
PAT:A1009 Product of Polynomials (25 分)
PAT:A1009 Product of Polynomials (25 分)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 ...原创 2018-08-20 09:21:56 · 355 阅读 · 0 评论 -
PAT:A1008 Elevator (20 分)
PAT:A1008 Elevator (20 分)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 spec...原创 2018-08-20 09:21:02 · 247 阅读 · 0 评论 -
PAT:A1006 Sign In and Sign Out (25 分)
PAT:A1006 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...原创 2018-08-17 13:43:43 · 453 阅读 · 0 评论 -
PAT:A1005 Spell It Right
PAT:A1005 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 ...原创 2018-08-17 13:41:57 · 331 阅读 · 0 评论 -
PAT:A1002 A+B for Polynomials (25 分)
PAT:A1002 A+B for Polynomials (25 分)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 lin...原创 2018-08-17 13:40:56 · 558 阅读 · 0 评论 -
PAT:A1001 A+B Format (20 分)
PAT:A1001 A+B Format (20 分)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).Inpu...原创 2018-08-17 13:38:32 · 389 阅读 · 0 评论 -
PAT:A1028 List Sorting (25 分)
PAT:A1028 List Sorting (25 分)Excel can sort records according to any column. Now you are supposed to imitate this function.Input Specification:Each input file contains one test case. For each ca...原创 2018-08-22 10:11:08 · 259 阅读 · 0 评论 -
PAT:A1015 Reversible Primes (20 分)
PAT:A1015 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...原创 2018-08-20 09:24:38 · 266 阅读 · 0 评论 -
PAT:A1016 Phone Bills (25 分)
PAT:A1016 Phone Bills (25 分)A long-distance telephone company charges its customers by the following rules:Making a long-distance call costs a certain amount per minute, depending on the time of d...原创 2018-08-20 09:26:42 · 581 阅读 · 0 评论 -
PAT:A1031 Hello World for U (20 分)
PAT:A1031 Hello World for U (20 分)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 rlowo...原创 2018-08-27 12:52:20 · 329 阅读 · 0 评论 -
PAT:A1047 Student List for Course (25 分)
PAT:A1047 Student List for Course (25 分)Zhejiang University has 40,000 students and provides 2,500 courses. Now given the registered course list of each student, you are supposed to output the stude...原创 2018-08-29 15:09:50 · 299 阅读 · 0 评论 -
PAT:A1046 Shortest Distance (20 分)
PAT:A1046 Shortest Distance (20 分)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 S...原创 2018-08-29 15:09:01 · 284 阅读 · 0 评论 -
PAT:A1025 PAT Ranking (25 分)
PAT:A1025 PAT Ranking (25 分)Programming Ability Test (PAT) is organized by the College of Computer Science and Technology of Zhejiang University. Each test is supposed to run simultaneously in sever...原创 2018-08-21 10:22:02 · 283 阅读 · 0 评论