大家看一看吧!还是英文的!
Prime Palindromes
--------------------------------------------------------------------------------
Time limit: 15sec. Submitted: 2363
Memory limit: 32M Accepted: 362
Source : USACO Gateway
--------------------------------------------------------------------------------
The number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as backward). Write a program that finds all prime palindromes in the range of two supplied numbers a and b (5 <= a < b <= 1000,000,000); both a and b are considered to be within the range .
Input
Line 1: Two integers, a and b
Output
The list of palindromic primes in numerical order, one per line.
Sample Input
5 500
Sample Output
5
7
11
101
131
151
181
191
313
353
373
383
要怎样判断一个数字的首位数字是否相同啊!
例如:101
37573
还有谁知道这道题的大概意思是什么呀!
[此贴子已经被作者于2006-11-9 20:14:12编辑过]