PAT甲级
ur_ytii
这个作者很懒,什么都没留下…
展开
-
1012 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 or Linear Algrbra), and E - Eng...原创 2020-04-03 18:48:41 · 142 阅读 · 0 评论 -
1093 Count PAT's (25分)
The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed by the 3rd, the 4th, and the 6th characters.Now ...原创 2020-04-01 18:06:52 · 191 阅读 · 0 评论 -
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...原创 2020-03-13 18:14:12 · 103 阅读 · 0 评论 -
1061 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 that those strange strings...原创 2020-03-10 11:53:30 · 125 阅读 · 0 评论 -
1073 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]+E[+-][0-9]+ which means that the inte...原创 2020-03-09 10:44:20 · 175 阅读 · 0 评论 -
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).Input Specification:Each input ...原创 2020-03-07 09:05:20 · 107 阅读 · 0 评论 -
1077 Kuchiguse (20分) 不知道PTA啥时候开始不让用gets了,得用cin.getline(char *,n)
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 ...原创 2020-03-05 22:03:57 · 220 阅读 · 0 评论 -
1035 Password (20分)
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 ...原创 2020-03-04 19:10:32 · 132 阅读 · 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. Eac...原创 2020-03-03 19:32:25 · 94 阅读 · 0 评论 -
1082 Read Number in Chinese (25分)
Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output Fu first if it is negative. For example, -123456789 is read as Fu yi Yi er Qian san Bai ...原创 2020-03-01 19:17:39 · 114 阅读 · 0 评论 -
1058 A+B in Hogwarts (20分)*很简单的题,但可能由于溢出不能AC
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...原创 2020-02-05 11:49:47 · 446 阅读 · 0 评论 -
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...原创 2020-02-05 11:26:14 · 74 阅读 · 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...原创 2020-02-05 11:18:42 · 99 阅读 · 0 评论 -
1031 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 rlowoThat is, the characters must be p...原创 2020-02-03 22:07:19 · 269 阅读 · 1 评论 -
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...原创 2020-02-03 18:19:33 · 169 阅读 · 0 评论 -
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...原创 2020-02-03 17:43:12 · 118 阅读 · 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. Si...原创 2020-02-03 16:03:32 · 119 阅读 · 0 评论 -
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 (≤10). The...原创 2020-01-24 10:34:46 · 195 阅读 · 0 评论 -
1046 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 Specification:Each input file conta...原创 2020-01-24 10:15:05 · 85 阅读 · 0 评论 -
1042 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" where employees collaborate with gambler...原创 2020-01-23 20:55:27 · 90 阅读 · 0 评论 -
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...原创 2020-01-23 19:29:42 · 146 阅读 · 2 评论 -
1002 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 lines, and each line contains the informa...原创 2020-01-23 18:59:10 · 89 阅读 · 0 评论