![](https://img-blog.csdnimg.cn/0f3eec18852840c5ae82cbfb35aced87.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
PAT (Advanced Level) Practice
文章平均质量分 77
PTA甲级练习(本人英语不好,太难了)
三块不一样的石头
(๑•́ωก̀๑)打铁选手
展开
-
1059 Prime Factors
给你一个正整数,你要用其素数因子组合成如上所述的式子,并使其值与该正整数相同。注意输入为1时,输出为 1 = 1 (测试点3)先打一个素数表,然后逐个判断过来即可。要求:尽可能的使用较小的素数因子。原创 2023-02-23 23:04:33 · 78 阅读 · 0 评论 -
1058 A+B in Hogwarts
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 Sickle, it's easy enough." Your job is to write a program原创 2022-11-21 20:07:23 · 267 阅读 · 0 评论 -
1057 Stack
【代码】1057 Stack。原创 2022-11-21 20:00:04 · 311 阅读 · 0 评论 -
1056 Mice and Rice
【代码】1056 Mice and Rice。原创 2022-11-21 19:53:43 · 186 阅读 · 0 评论 -
1055 The World‘s Richest
【代码】1055 The World's Richest。原创 2022-11-16 22:23:50 · 260 阅读 · 0 评论 -
1054 The Dominant Color
【代码】1054 The Dominant Color。原创 2022-11-16 22:18:30 · 238 阅读 · 0 评论 -
1053 Path of Equal Weight
【代码】1053 Path of Equal Weight。原创 2022-11-15 22:12:15 · 211 阅读 · 0 评论 -
1052 Linked List Sorting
A linked list consists of a series of structures, which are not necessarily adjacent in memory. We assume that each structure contains an integer and a pointer to the next structure. Now given a linked list, you are supposed to sort the structures accord原创 2022-11-15 22:07:52 · 191 阅读 · 0 评论 -
1051 Pop Sequence
【代码】1051 Pop Sequence。原创 2022-11-15 22:02:15 · 199 阅读 · 0 评论 -
1050 String Subtraction
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, it might not be that simple to do it fast.Each input fi原创 2022-11-14 23:47:11 · 103 阅读 · 0 评论 -
1049 Counting Ones
【代码】1049 Counting Ones。原创 2022-11-13 20:08:54 · 105 阅读 · 0 评论 -
1048 Find Coins
【代码】1048 Find Coins。原创 2022-11-12 20:40:30 · 324 阅读 · 0 评论 -
1047 Student List for Course
【代码】1047 Student List for Course。原创 2022-11-12 20:33:00 · 124 阅读 · 0 评论 -
1046 Shortest Distance
【代码】1046 Shortest Distance。原创 2022-11-12 20:27:32 · 334 阅读 · 0 评论 -
1045 Favorite Color Stripe
【代码】1045 Favorite Color Stripe。原创 2022-11-11 18:49:55 · 251 阅读 · 0 评论 -
1044 Shopping in Mars
【代码】1044 Shopping in Mars。原创 2022-11-11 17:16:35 · 232 阅读 · 0 评论 -
1043 Is It a Binary Search Tree
1043 Is It a Binary Search Tree原创 2022-11-11 16:15:15 · 262 阅读 · 0 评论 -
1042 Shuffling Machine
【代码】1042 Shuffling Machine。原创 2022-11-10 09:48:32 · 238 阅读 · 0 评论 -
1041 Be Unique
【代码】1041 Be Unique。原创 2022-11-10 09:45:24 · 214 阅读 · 0 评论 -
1040 Longest Symmetric String
1040 Longest Symmetric String原创 2022-11-09 15:43:27 · 195 阅读 · 0 评论 -
1039 Course List for Student
【代码】1039 Course List for Student。原创 2022-11-09 15:41:52 · 126 阅读 · 0 评论 -
1038 Recover the Smallest Number
【代码】1038 Recover the Smallest Number。原创 2022-11-09 15:35:17 · 68 阅读 · 0 评论 -
1037 Magic Coupon
【代码】1037 Magic Coupon。原创 2022-11-08 22:54:52 · 265 阅读 · 0 评论 -
1036 Boys vs Girls
【代码】1036 Boys vs Girls。原创 2022-11-08 20:55:16 · 1496 阅读 · 0 评论 -
1035 Password
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 (one) from ( in lowercase), or (zero) from ( in uppercase). One soluti原创 2022-11-08 20:50:12 · 320 阅读 · 0 评论 -
1034 Head of a Gang
【代码】1034 Head of a Gang。原创 2022-11-07 15:33:57 · 148 阅读 · 0 评论 -
1033 To Fill or Not to Fill
【代码】1033 To Fill or Not to Fill。原创 2022-11-07 15:27:53 · 266 阅读 · 0 评论 -
1032 Sharing
To store English words, one method is to use linked lists and store a word letter by letter. To save some space, we may let the words share the same sublist if they share the same suffix. For example, and are stored as showed in Figure 1.Figure 1You are原创 2022-11-07 15:15:45 · 150 阅读 · 0 评论 -
1031 Hello World for U
Given any string of N (≥5) characters, you are asked to form the characters into the shape of . For example, can be printed as: That is, the characters must be printed in the original order, starting top-down from the left vertical line with n1 char原创 2022-08-15 14:37:14 · 123 阅读 · 0 评论 -
1030 Travel Plan
【代码】1030 Travel Plan。原创 2022-11-06 20:43:16 · 205 阅读 · 0 评论 -
1029 Median
【代码】1029 Median。原创 2022-11-06 17:45:16 · 109 阅读 · 0 评论 -
1028 List Sorting
【代码】1028 List Sorting。原创 2022-11-06 10:28:56 · 182 阅读 · 0 评论 -
1027 Colors in Mars
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 , the middle 2 digits for , and the last 2 digits for . The only difference i原创 2022-11-06 10:22:20 · 194 阅读 · 0 评论 -
1026 Table Tennis
【代码】1026 Table Tennis。原创 2022-11-06 10:17:44 · 301 阅读 · 0 评论 -
1025 PAT Ranking
【代码】1025 PAT Ranking。原创 2022-11-05 19:32:29 · 60 阅读 · 0 评论 -
1024 Palindromic Number
【代码】1024 Palindromic Number。原创 2022-11-05 19:26:29 · 257 阅读 · 0 评论 -
1023 Have Fun with Numbers
【代码】1023 Have Fun with Numbers。原创 2022-11-05 19:17:23 · 68 阅读 · 0 评论 -
1022 Digital Library
【代码】1022 Digital Library。原创 2022-11-05 11:52:30 · 288 阅读 · 0 评论 -
1021 Deepest Root
A graph which is connected and acyclic can be considered a tree. The height of the tree depends on the selected root. Now you are supposed to find the root that results in a highest tree. Such a root is called the deepest root.Each input file contains one原创 2022-11-04 15:18:47 · 385 阅读 · 0 评论 -
1020 Tree Traversals
【代码】1020 Tree Traversals。原创 2022-11-04 11:37:18 · 71 阅读 · 0 评论