PAT 1023.Have Fun with Number
题目Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 24691 ...
Read more
PAT 1019.General Palindromic Number
题目A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic numb ...
Read more
PAT 1015.Reversible Primes
题目A reversible prime in 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 ...
Read more
PAT 1011.World Cup Betting
题目With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing ...
Read more
PAT 1008.Elevator
题目The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the el ...
Read more
PAT 1005.Spell It Right
题目Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specifica ...
Read more
PAT 1002.A+B for Polynomials
题目This time, you are supposed to find A+B where A and B are two polynomials.InputEach input file contains one test case. Each case occupies 2 lines, a ...
Read more
PAT 1001.A+B Format
题目Calculate a + b and output the sum in standard format – that is, the digits must be separated into groups of three by commas (unless there are less ...
Read more
PAT 1054.求平均值
题目本题的基本要求非常简单:给定N个实数,计算它们的平均值。但复杂的是有些输入数据可能是非法的。一个“合法”的输入是[-1000,1000]区间内的实数,并且最多精确到小数点后2位。当你计算平均值的时候,不能把那些非法的数据算在内。输入格式:输入第一行给出正整数N(<=100)。随后一行给出N ...
Read more
PAT 1060.爱丁顿数
题目英国天文学家爱丁顿很喜欢骑车。据说他为了炫耀自己的骑车功力,还定义了一个“爱丁顿数”E,即满足有E天骑车超过E英里的最大整数E。据说爱丁顿自己的E等于87。现给定某人N天的骑车距离,请你算出对应的爱丁顿数E(<=N)。输入格式:输入第一行给出一个正整数N(<=105),即连续骑车的天 ...
Read more