#t59. 含有 7 的素数
含有 7 的素数
Primes Containing the Digit 7
Problem Description
Little J learned about prime numbers yesterday and found them great fun. He wants to find some special primes. Since his lucky number is , he wants to know which primes in a given range have a in any digit. Tell him!
Input Format
Two integers ().
Output Format
Output, in ascending order, all primes in the interval [m, n] that contain the digit in any position.
If no prime in this interval satisfies the requirement, output none.
Sample Input 1
1 20
Sample Output 1
7 17
Sample Input 2
20 30
Sample Output 2
none