Pat计算机考试
振很忙
都只会一点点,哈
展开
-
PatB1042:字符统计(取代gets函数)
1、题目请编写程序,找出一段给定文字中出现最频繁的那个英文字母。2、输入格式输入在一行中给出一个长度不超过 1000 的字符串。字符串由 ASCII 码表中任意可见字符及空格组成,至少包含 1 个英文字母,以回车结束(回车不算在内)。3、输出格式在一行中输出出现频率最高的那个英文字母及其出现次数,其间以空格分隔。如果有并列,则输出按字母序最小的那个字母。统计时不区分大小写,输出小写字母。4、输入样例This is a simple TEST. There ARE number原创 2020-05-26 10:14:46 · 209 阅读 · 1 评论 -
PatA1075:PAT Judge
1、题目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.2、输入格式Each input file contains o...原创 2020-05-08 09:32:27 · 142 阅读 · 0 评论 -
PatA1055:The World's Richest
1、题目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 job, but concentrate only on the...原创 2020-05-07 09:18:02 · 141 阅读 · 0 评论 -
PatA1028:List Sorting
1、题目Excel can sort records according to any column. Now you are supposed to imitate this function.2、输入格式Each input file contains one test case. For each case, the first line contains two integer...原创 2020-05-04 11:13:11 · 152 阅读 · 0 评论 -
PatA1025:PAT Ranking
1、题目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 rankl...原创 2020-05-04 10:28:06 · 207 阅读 · 0 评论 -
PatB1015/A1062:德才论(sort!!!!)
1、题目About 900 years ago, a Chinese philosopher Sima Guang wrote a history book in which he talked about people's talent and virtue. According to his theory, a man being outstanding in both talent an...原创 2020-04-27 11:19:43 · 212 阅读 · 0 评论 -
PatA1035:Password
1、题目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...原创 2020-04-23 11:11:08 · 209 阅读 · 0 评论 -
PatB1024/A1073:科学计数法
## 题目科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式 [+-][1-9].[0-9]+E[+-][0-9]+,即数字的整数部分只有 1 位,小数部分至少有 1 位,该数字及其指数部分的正负号即使对正数也必定明确给出。现以科学计数法的格式给出实数 A,请编写程序按普通数字表示法输出 A,并保证所有有效位都被保留。## 输入格式每个输入包含 1 个测试...原创 2020-04-15 13:40:20 · 118 阅读 · 0 评论 -
PatA1031: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...原创 2020-04-07 23:23:05 · 184 阅读 · 0 评论 -
PatB1027:打印沙漏
题目本题要求你写个程序把给定的符号打印成沙漏的形状。例如给定17个“*”,要求按下列格式打印:*****************所谓“沙漏形状”,是指每行输出奇数个符号;各行符号中心对齐;相邻两行符号数差2;符号数先从大到小顺序递减到1,再从小到大顺序递增;首尾符号数相等。给定任意N个符号,不一定能正好组成一个沙漏。要求打印出的沙漏能用掉尽可能多的符号。输入格式输入在一行给出1个...原创 2020-04-07 23:01:24 · 104 阅读 · 0 评论