Super Primes
started by: JGatJGat
on: 1210591254|%e %b %Y, %H:%M %Z|agohover
number of posts: 1
rss icon RSS: new posts
summary:
Mathematical Thinking here... From ACPC Samples
Super Primes
JGatJGat 1210591254|%e %b %Y, %H:%M %Z|agohover

What are Super Primes?

  • A Super Prime is a prime number with the additional interesting property that as each digit is removed from the right the number which remains is a prime.

Instructions

The following is a list of Super Primes of length 4:
2333
2339
2393
2399
2939
3119
3137
3733
3739
3793
3797
5939
7193
7331
7333
7393

Instructions

  • Write a program that prints all super primes of length 6
  • Your output should contain each Super Prime on a line each.
  • Output sould be in ascending order.
  • No other output should be produced by your program other than the numbers.

If you can use File I/O, output your answer to "primes.txt"

last edited on 1210629612|%e %b %Y, %H:%M %Z|agohover by JGat + show more
unfold Super Primes by JGatJGat, 1210591254|%e %b %Y, %H:%M %Z|agohover
new post
Unless stated otherwise Content of this page is licensed under Creative Commons Attribution-NonCommercial 3.0 License