Algorithm of 10235 - Simply Emirp

Problem Description Link
Algorithm:
It is a simple problem but you must read carefully
this problem check three condition
    1. "N is not prime.", if N is not a Prime number.
    2. "N is prime.", if N is Prime and N is not Emirp.
    3. "N is emirp.", if N is Emirp.
condition 3 is emirp . a number is emirp if number is prime and reverse number is prime and must satisfy this
condition that number and reverse number are not same
for example.
17 is Emirp because 17 as well as 71 are Prime.
but 101 is a prime not emirp because when reverse the
number reverse number is 101 so number =reverse number so it is not emirp and (2, 3, 5,7) are not emirp only prime.

image

No comments:

Post a Comment

Write your comment - Share Knowledge and Experience