Mr Lathi and his Numbers
All submissions for this problem are available.
Mr Lathi likes to play with primes.He asked a range,R=[L,U] of numbers from which firstly find the prime numbers,P,that fall in that range.L is the
lower limit of R and U the upper limit.Then from those prime numbers find all the 5 digit palindrome numbers. 5 digit palindrome numbers can also be created
by combining N prime numbers which are found previously.The value of N is 2.The palindrome numbers that are formed or are present should also fall within
the given range,R.
There should be 2 lines of input .
The 2nd line should be the upper value of the range,U.
Untill all the constraints are not fulfilled it should ask for the new value for U.
There shoule be one line in the output giving the number of palindromes found.
- width of R ≤ 500000
- L > -1
- L ≤ U
Input: 999 200999 Output: 93
|Time Limit:||1 - 1.57 sec|
|Source Limit:||50000 Bytes|
Fetching successful submissions