12946 - Palindromic Primes of Range
|
Time |
Memory |
| Case 1 |
1 sec |
32 MB |
| Case 2 |
1 sec |
32 MB |
| Case 3 |
1 sec |
32 MB |
| Case 4 |
1 sec |
32 MB |
| Case 5 |
1 sec |
32 MB |
Description
Given two integers Num1, Num2.
Please Write a C program to print out all the palindromic prime numbers between Num1 and Num2 (Included Num1 and Num2).
Input
Two integers Num1, Num2.
Note that:
- Num2 is bigger than Num1.
- 32,767 >= Num2 > Num1 >= 0.
Output
Output should follow below format:
P1 P2 P3 P4 … Pn
Note:
- Need to have a return value('\n') at the end of your string.
- P1 ~ Pn are all palindromic prime numbers between Num1 and Num2.
- P1 ~ Pn should be arranged in ascending power. That means, Pn > … > P4 > P3 > P2 > P1.
- If there are no palindromic primes, print “None\n”.
Tags