• ## PAT A1160 Forever (20point(s))

"Forevernumber"isapositiveintegerAwithKdigits,satisfyingthefollowingconstrains:thesumofallthedigitsofAism;thesumofallthedigitsofA+1isn;andth

查看全文
• ## PAT A1156 Sexy Primes (20point(s))

Sexyprimesarepairsofprimesoftheform(p,p+6),so-namedsince"sex"istheLatinwordfor"six".(Quotedfromhttp://mathworld.wolfram.com/SexyPr

查看全文
• ## PAT A1093 Count PAT's (25point(s))

The string APPAPT contains two PAT's as substrings. The first one is formed by the 2nd, the 4th, and the 6th characters, and the second one is formed

查看全文
• ## PAT A1096 Consecutive Factors (20point(s))

Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3×5×6×7, where 5, 6, a

查看全文
• ## PAT A1148 Werewolf - Simple Version (20point(s))

Werewolf（狼人杀） is a game in which the players are partitioned into two parties: the werewolves and the human beings. Suppose that in a game,player #1 s

查看全文
• ## PAT A1128 N Queens Puzzle (20point(s))

The "eight queens puzzle" is the problem of placing eight chess queens on an 8×8 chessboard so that no two queens threaten each other. Thus,

查看全文
• ## PAT A1117 Eddington Number (25point(s))

British astronomer Eddington liked to ride a bike. It is said that in order to show off his skill, he has even defined an "Eddington number"

查看全文
• ## PAT A1104 Sum of Number Segments (20point(s))

Givenasequenceofpositivenumbers,asegmentisdefinedtobeaconsecutivesubsequence.Forexample,giventhesequence{0.1,0.2,0.3,0.4},wehave10segments:(0.1)(0.1,0

查看全文