Kokos Assignment

All submissions for this problem are available.
Koko is a student studying in the 6th standard. Koko’s Math teacher has taught him Prime numbers today and
has given his class a homework assignment. The assignment is to find out all the prime numbers between any 2
numbers such that it every prime number contains the digit – 1 in it. (eg. 13, 17, etc). Help Koko finish his
assignment faster by writing a code for it.
Prime Numbers: A number is a Prime if its only factors are 1 and he number itself.
Eg. 3, 5, 23, 31, 41.
Input
Take two inputs from the user.
 The first input being the starting range(say n)
 and the second being the ending range(say m)
Output
List of all the prime numbers which are between n and m (both inclusive) and also have the digit ‘1’ in each
of them.
Constraints
 0<=n<=1000
 0<=m<=1000
Example
 Input
10 20
Output
11 13 17 19  Input
40 50
Output
41  Input
60 120
Output
61 71 113 117
Explanation
For input
10 40
All the prime numbers in the given range are – 11,
13, 17, 19, 23, 29, 31 and 37. But the numbers which
have the digit 1 in it are – 11,13,17,19.
Output is
11 13 17 19 31
Author:  aranta 
Tags  aranta 
Date Added:  8022014 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  GO, ADA, ASM 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 