Dev.to1 min read
EMIRP
Emirp Number – Explanation What is an Emirp Number? An Emirp number is a special type of prime number. Conditions: The number itself must be prime Its reverse must also be prime The reversed number should be different from the original Example: 17 → Prime Reverse (71) → Prime 17 ≠ 71 → Valid Emirp So, 17 is an Emirp number PYTHON : def prime(no): div=2 while div < no/2: if no % div == 0: return False div += 1 return True def reverse(no): rev = 0 while no > 0: rev = rev * 10 + no % 10 no = no //
Read original on dev.to0
0Related
Hacker News
$500 GPU outperforms Claude Sonnet on coding benchmarks
Discussed on Hacker News with 377 points and 217 comments.
377
217Hacker News
Whistler: Live eBPF Programming from the Common Lisp REPL
Discussed on Hacker News with 115 points and 13 comments.
115
13Hacker News
Anthropic Subprocessor Changes
Discussed on Hacker News with 98 points and 44 comments.
98
44Get the 10 best reads every Sunday
Curated by AI, voted by readers. Free forever.
Liked this? Start your own feed.
Comment
Sign in to join the discussion.
Loading comments…