PR Numbers

Problem link : https://www.hackerearth.com/challenges/competitive/march-circuits-19/algorithm/pr-numbers-160aa0c9/
Can anyone help to explain problem statement.
problem statement :
1
2
3
4
5
You are given two integers L and R. You are required to find  the count of all the PR numbers in the range L to R inclusively. 
PR number are the numbers which satisfy following 2 properties: -
P:- No pair of adjacent digits are coprime i.e. 2 adjacent digits in a PR number will not be coprime to each other.
R:- PR number is divisible by all the single digit prime numbers which occur as a digit in the PR number.
1<=L,R<=1018

According to me between 1 and 100. These are the PR numbers

1 2 3 4 5 6 7 8 9 20 22 24 26 28 30 33 36 39 40 42 44 46 48 50 55 60 62 63 64 66 68 69 70 77 80 82 84 86 88 90 93 96 99
if this is wrong then correct me .
Last edited on
> Can anyone help to explain problem statement.
Not without registering on the site to find out your question.
Problem statement is added ..
I'm not sure if 20, 30, ..., 90 would count. That would mean that 2 and 0 are not coprime, etc. And if they are, then why not 1 and 0?
Sorry 1 is not PR number.
I think 20,30..90 should be PR number because 0 and 2 aren't coprime as gcd(0, 2) =2 and 20 is divisible by 2 which is present as a digit in 20
Last edited on
¿why not? 1 has only one digit and it's not prime, so no conditions matter.
so, my given numbers are right in between 1 and 100 ?
Last edited on
Topic archived. No new replies allowed.