PAT甲级模拟题
文章平均质量分 69
之前学习时,在前面的几个大多程序都没有注释(虽然PAT也不建议放注释),所以想自己写有注释的文章,帮后面来学习的同学一把。但技术水平有限,写得没有柳神水平那么高,凑合看看吧
icesord
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 m原创 2022-04-08 09:37:49 · 204 阅读 · 0 评论 -
PAT甲级1010 Radix(23分)
题目: Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer isyes, if 6 is a decimal number and 110 is a binary number. Now for any pair of positive integersN1andN2, your task is to find the radix of...原创 2022-04-07 17:46:57 · 204 阅读 · 0 评论 -
PAT甲级1009 Product of Polynomials
题目: This time, you are supposed to findA×BwhereAandBare two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: KN1aN1N2aN2...NK...原创 2022-04-01 10:52:14 · 154 阅读 · 0 评论 -
PAT甲级1008 Elevator
题目: The highest building in our city has only one elevator. A request list is made up withNpositive 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 secon..原创 2022-04-01 10:44:04 · 156 阅读 · 0 评论 -
PAT甲级1007 Maximum Subsequence Sum
题目: Given a sequence ofKintegers {N1,N2, ...,NK}. A continuous subsequence is defined to be {Ni,Ni+1, ...,Nj} where1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of its elements. For example, give...原创 2022-04-01 09:31:56 · 170 阅读 · 0 评论 -
PAT甲级1006 Sign In and Sign Out
题目: 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 are supposed to find the ones who have unlocked an原创 2022-03-31 17:34:12 · 113 阅读 · 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^1原创 2022-03-31 17:24:43 · 159 阅读 · 0 评论 -
PAT甲级1004 Counting Leaves
题目: A family hierarchy is usually presented by a pedigree tree. Your job is to count those family members who have no child. Input Specification: Each input file contains one test case. Each case starts with a line containing0<N<100, the number o.原创 2022-03-30 16:13:06 · 229 阅读 · 0 评论 -
PAT甲级1003 Emergency
题目: As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are m原创 2022-03-30 15:55:39 · 110 阅读 · 0 评论 -
PAT甲级1002 A+B for Polynomials
题目: This time, you are supposed to findA+BwhereAandBare two polynomials. Input Specification: Each input file contains one test case. Each case occupies 2 lines, and each line contains the information of a polynomial: KN1aN1N2aN2...NK...原创 2022-03-28 10:24:38 · 112 阅读 · 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 p原创 2022-03-28 10:18:42 · 312 阅读 · 0 评论
分享