
PTA
丿Star
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
古风排版
L1-039 古风排版 (20 分) 中国的古人写文字,是从右向左竖向排版的。本题就请你编写程序,把一段文字按古风排版。 输入格式: 输入在第一行给出一个正整数N(<100),是每一列的字符数。第二行给出一个长度不超过1000的非空字符串,以回车结束。 输出格式: 按古风格式排版给定的字符串,每列N个字符(除了最后一列可能不足N个)。 输入样例: 4 This is a test case 输出样例: asa T st ih e tsi ce s 源代码: #include<iostr.原创 2020-07-16 21:15:54 · 327 阅读 · 0 评论 -
1015 Reversible Primes (20 分)
Areversible primein any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a reversible prime because its reverse 37 is also a pr...原创 2019-04-07 09:15:46 · 193 阅读 · 0 评论 -
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 subsequen...原创 2019-04-02 19:08:12 · 453 阅读 · 9 评论 -
PAT甲级 1004.Counting Leaves (30)
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 w...原创 2019-10-07 10:50:27 · 120 阅读 · 0 评论 -
1014 Waiting in Line (30 分)
Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are: The space ...原创 2019-10-07 16:05:39 · 163 阅读 · 0 评论 -
1017 Queueing at Bank (25 分)
Suppose a bank has K windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. All the customers have to wait in line behind the yello...原创 2019-10-07 20:45:23 · 174 阅读 · 0 评论