Feature:刷题
@kidultff

PAT-A 真题- 1103. Integer Factorization

原题干:The K-P factorization of a positive integer N is to write N as the sum of the P-th power of K positive integers. You are supposed to write a program to find the K-P factorization of N for any positive integers N, K and P. ...
  • 0
  • 0
@kidultff

PAT-B 真题- 1075. 链表元素分类 / A 1133 Splitting A Linked List

原题干:给定一个单链表,请编写程序将链表元素进行分类排列,使得所有负值元素都排在非负值元素的前面,而[0, K]区间内的元素都排在大于K的元素前面。但每一类内部元素的顺序是不能改变的。例如:给定链表8→7→-4→0→5→-6→10→11→-2,K 为 10,则输 ...
  • 0
  • 0
@kidultff

PAT-A 真题- 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, "loading" and "being" ...
  • 0
  • 1
@kidultff

PAT-A 真题- 1051. Pop Sequence

题干:Given a stack which can keep M numbers at most. Push N numbers in the order of 1, 2, 3, ..., N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the stack. For example, ...
  • 0
  • 0
@kidultff

PAT-B 真题- 1071. 小赌怡情

常言道"小赌怡情"。这是一个很简单的小游戏:首先由计算机给出第一个整数;然后玩家下注赌第二个整数将会比第一个数大还是小;玩家下注t个筹码后,计算机给出第二个数。若玩家猜对了,则系统奖励玩家t个筹码;否则扣除玩家t个筹码。注意:玩家下注 ...
  • 0
  • 0