
PAT
文章平均质量分 74
byhj
这个作者很懒,什么都没留下…
展开
-
PAT 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. Eac原创 2014-10-09 16:00:40 · 253 阅读 · 0 评论 -
PAT 1077. Kuchiguse (20)
The Japanese language is notorious for its sentence ending particles. Personal preference of such particles can be considered as a reflection of the speaker's personality. Such a preference is called原创 2014-10-11 09:49:10 · 507 阅读 · 0 评论 -
PAT 1050. 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 calculate S1 - S2 for any given strings. However,原创 2014-10-11 12:27:59 · 310 阅读 · 0 评论 -
1019. 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 single digit numbers are palindromic numbers原创 2014-10-12 19:38:31 · 272 阅读 · 0 评论 -
PAT 1025. 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 several places, and the ranklists w原创 2014-10-13 11:38:56 · 435 阅读 · 0 评论 -
PAT 1036. Boys vs Girls (25)
This time you are asked to tell the difference between the lowest grade of all the male students and the highest grade of all the female students.Input Specification:Each input file contains one t原创 2014-10-13 10:38:29 · 288 阅读 · 0 评论 -
PAT 1022. Digital Library (30)
A Digital Library contains millions of books, stored according to their titles, authors, key words of their abstracts, publishers, and published years. Each book is assigned an unique 7-digit number a原创 2014-10-15 09:18:15 · 307 阅读 · 0 评论 -
PAT 1023. 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 happens to be another 9-digit number con原创 2014-10-15 11:45:09 · 331 阅读 · 0 评论 -
PAT 1065. 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 positive number of test cases, T (Output Specif原创 2014-10-15 18:16:54 · 369 阅读 · 0 评论 -
PAT 1028. List Sorting (25)
Excel can sort records according to any column. Now you are supposed to imitate this function.InputEach input file contains one test case. For each case, the first line contains two integers N (<=原创 2014-10-15 10:02:09 · 296 阅读 · 0 评论 -
PAT 1029. Median (25)
Given an increasing sequence S of N integers, the median is the number at the middle position. For example, the median of S1={11, 12, 13, 14} is 12, and the median of S2={9, 10, 15, 16, 17} is 15. The原创 2014-10-15 12:00:33 · 274 阅读 · 0 评论 -
PAT 1071. Speech Patterns (25)
People often have a preference among synonyms of the same word. For example, some may prefer "the police", while others may prefer "the cops". Analyzing such patterns can help to narrow down a speaker原创 2014-10-15 12:10:03 · 313 阅读 · 0 评论 -
PAT 1040. Longest Symmetric String (25)
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given "Is PAT&TAP symmetric?", the longest symmetric sub-string is "s PAT&TAP s", hence you must原创 2014-10-11 09:02:44 · 303 阅读 · 0 评论 -
PAT 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 pr原创 2014-10-12 12:09:25 · 328 阅读 · 0 评论 -
PAT 1002. A+B for Polynomials (25)
This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polyn原创 2014-10-09 12:14:52 · 275 阅读 · 0 评论 -
PAT 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. Si原创 2014-10-09 22:39:09 · 259 阅读 · 0 评论 -
PAT 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原创 2014-10-09 19:41:15 · 321 阅读 · 0 评论 -
PAT 1009. 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 lines, and each line contains the informa原创 2014-10-09 22:12:54 · 257 阅读 · 0 评论 -
PAT 1008. 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 specified order. It costs 6 sec原创 2014-10-09 18:08:37 · 249 阅读 · 0 评论 -
PAT 1001. 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).InputEach input file contains原创 2014-10-09 11:22:37 · 333 阅读 · 0 评论 -
PAT 1041. Be Unique (20)
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, 104]. The first one who bets on原创 2014-10-11 08:56:29 · 254 阅读 · 0 评论 -
PAT 1058. 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 Galleon and twenty-nine Knuts to a Si原创 2014-10-11 08:58:58 · 281 阅读 · 0 评论 -
1084. 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 a string that you are supposed to原创 2014-10-11 09:22:14 · 291 阅读 · 0 评论 -
PAT 1070. 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 the region's culture. Now原创 2014-10-11 09:03:20 · 264 阅读 · 0 评论 -
PAT 1027. Colors in Mars (20)
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 dig原创 2014-10-11 16:40:34 · 333 阅读 · 0 评论 -
1038. Recover the Smallest Number (30)
Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-0229-8原创 2014-10-20 21:03:38 · 384 阅读 · 0 评论