Skip to main content

All Questions

Tagged with
2 votes
2 answers
2k views

Simple Input Text Analysis

I've started learning java. I've written a small program I've done in C before. It's simple input analysis. If there is number, program checks if number is prime. Then write number: (value of input ...
Johnczek's user avatar
  • 121
2 votes
3 answers
517 views

HackersEarth - Reverse primes

Generate as many distinct primes P such that reverse (P) is also prime and is not equal to P. Output: Print per line one integer( ≤ 10^15 ). Don't print more than 10^6 integers in all. ...
Ankur Anand's user avatar
5 votes
1 answer
1k views

Determine all prime, palindrome string integers within a range

I have written a program in Python 3x to determine all the prime, palindrome string integers in the range of two given numbers. ...
paulkr's user avatar
  • 53
25 votes
5 answers
2k views

Count distinct primes, discarding palindromes, in under 2 seconds

Problem Statement Generate as many distinct primes P such that reverse (P) is also prime and is not equal to P. Output: Print per line one integer( ≤ 1015 ). Don't print more than 106 ...
Akash Rana's user avatar
5 votes
2 answers
3k views

Calculating all prime palindromes from 0 to 1000 and printing the largest

I have often read about how important clear and efficient code is. Also often people talk and write about 'beautiful' code. Some hints and critic from experienced developers for the following code ...
anaheim's user avatar
  • 153
12 votes
1 answer
335 views

Depth-first search method for searching for all "superpalindromes" whose prime factors are all <=N

A question was asked over at math.SE (here) about whether or not there are infinitely many superpalindromes. I'm going to rephrase the definition to a more suitable one for coding purposes: ...
Douglas S. Stones's user avatar