![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
PAT考试经验
Lei-sure
这个作者很懒,什么都没留下…
展开
-
PAT B1003 我要通过!
题目描述“答案正确”是自动判题系统给出的最令人欢喜的回复。本题属于 PAT 的“答案正确”大派送 —— 只要读入的字符串满足下列条件,系统就输出“答案正确”,否则输出“答案错误”。得到“答案正确”的条件是:字符串中必须仅有 P、 A、 T这三种字符,不可以包含其它字符;任意形如 xPATx 的字符串都可以获得“答案正确”,其中 x 或者是空字符串,或者是仅由字母 A 组成的字符串;如果 ...原创 2019-08-08 22:33:02 · 92 阅读 · 0 评论 -
PAT A1052 Linked List Sorting (25 分)
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer key and a Next pointer to the next structure. Now give...原创 2019-08-22 16:23:35 · 100 阅读 · 0 评论 -
PAT A1054 The Dominant Color (20 分)
Behind the scenes in the computer’s memory, color is always talked about as a series of 24 bits of information for each pixel. In an image, the color with the largest proportional area is called the d...原创 2019-08-17 16:41:30 · 88 阅读 · 0 评论 -
PAT A1100 Mars Numbers (20 分)
People on Mars count their numbers with base 13:Zero on Earth is called “tret” on Mars.The numbers 1 to 12 on Earth is called “jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec” on Mars, r...原创 2019-08-17 15:51:21 · 95 阅读 · 0 评论 -
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 student name lists of all the courses.Input Sp...原创 2019-08-16 21:23:35 · 97 阅读 · 0 评论 -
PAT A1039 Course List for Student (25 分)
Zhejiang University has 40000 students and provides 2500 courses. Now given the student name lists of all the courses, you are supposed to output the registered course list for each student who comes ...原创 2019-08-16 21:04:00 · 117 阅读 · 0 评论 -
codeup 1918 简单计算器
题目描述读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。输入:测试输入包含若干测试用例,每个测试用例占一行,每行不超过200个字符,整数和运算符之间用一个空格分隔。没有非法表达式。当一行中只有0时输入结束,相应的结果不要输出。输出:对每个测试用例输出1行,即该表达式的值,精确到小数点后2位。样例输入:30 / 90 - 26 + 97 - 5 - 6 -...原创 2019-08-21 22:57:45 · 206 阅读 · 0 评论 -
PAT A1056 Mice and Rice (25 分)
Mice and Rice is the name of a programming contest in which each programmer must write a piece of code to control the movements of a mouse in a given map. The goal of each mouse is to eat as much rice...原创 2019-08-21 22:28:46 · 136 阅读 · 0 评论 -
PAT A1081 Rational Sum
题目描述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 case starts with a positive ...原创 2019-08-09 23:25:41 · 104 阅读 · 0 评论 -
PAT B1045 / A1101 快速排序
题目描述There is a classical process named partition in the famous quick sort algorithm. In this process we typically choose one element as the pivot. Then the elements less than the pivot are moved to i...原创 2019-08-07 16:35:21 · 116 阅读 · 0 评论 -
PAT B1013 数素数
题目描述令 Pi 表示第 i 个素数。现任给两个正整数 M≤N≤104,请输出 PM 到 PN 的所有素数。输入格式:输入在一行中给出 M 和 N,其间以空格分隔。输出格式:输出从 PM 到 PN 的所有素数,每 10 个数字占 1 行,其间以空格分隔,但行末不得有多余空格。输入样例:5 27输出样例:11 13 17 19 23 29 31 ...原创 2019-08-09 15:58:02 · 121 阅读 · 0 评论 -
PAT B1008 数组元素循环右移问题
题目描述一个数组A中存有N(>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(≥0)个位置,即将AAA中的数据由(A0A1⋯AN−1)变换为(AN−M⋯AN−1A0A1⋯AN−M−1)(最后M个数循环移至最前面的M个位置)。如果需要考虑程序移动数据的次数尽量少,要如何设计移动的方法?输入格式:每个输入包含一个测试用例,第1行输入N(1≤N≤100)和M(≥0)...原创 2019-08-09 10:51:01 · 93 阅读 · 0 评论 -
PAT A1022 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...原创 2019-08-18 16:43:13 · 121 阅读 · 0 评论 -
PAT A1097 Deduplication on a Linked List (25 分)
Given a singly linked list L with integer keys, you are supposed to remove the nodes with duplicated absolute values of the keys. That is, for each value K, only the first node of which the value or a...原创 2019-08-23 11:49:52 · 125 阅读 · 0 评论