+ 7

[ASSIGNMENT] Palandöken Number

Palandöken Number that even if you delete any digit of number, number still prime. For example: 719 is a Palandöken number. If we delete 1, 79 still prime. Or delete 7, 19 still prime.. So, what is the sum of Palandöken Number till 100.000? (Palandöken is a name of mountain in Turkey.)

11th May 2018, 7:41 PM
Ali B.
Ali B. - avatar
11 Answers
+ 11
unsure whether numbers below 10 are consedered as Palandöken numbers since they are one digit numbers..... https://code.sololearn.com/cMoDRpp3n0t6/?ref=app
11th May 2018, 9:11 PM
Burey
Burey - avatar
+ 6
Solution marked as best is wrong - 31 should not be added because 1 is not prime. Moreover the prime test is very slow in the proposed solution. My one liner solution https://code.sololearn.com/cBIeiPDan69D/?ref=app
12th May 2018, 6:34 AM
VcC
VcC - avatar
+ 4
Time to validate challenge is too long. If you limit challenges in QA sololearn will lose any interest for more advanced users who only look for challenges. Kaimi Ace
12th May 2018, 6:43 AM
VcC
VcC - avatar
+ 2
Here is my solution on Python with comments for better understanding: https://code.sololearn.com/cXj8kKaFBIkA/?ref=app It calculates sum of all Palandoken numbers in a range from 1 to some given limit. It also prints a list of all such numbers. So type 100000 to see the answer for the question in this challenge. I consider single digit primes to be not Palandoken numbers, so my answer is 831711.
14th May 2018, 3:01 AM
Nevfy
0
@Burey As @VcC have already mentioned: 1 is not Prime number, so your solution is wrong. I see that you also consider single digit Primes as Palandoken numbers. I think that they are not, but to be sure we need some clarifications from @Ali B. - author of the challenge.
14th May 2018, 3:04 AM
Nevfy
0
@Ali B. First of all, I would like to ask you if single digit Primes should be considered as Palandoken numbers or not? Secondly, just a friendly advise, solve the challenge by your own before publishing it, or at least check solutions of participants on the correctness before mark them as "best answer". Otherwise, it brings a lot of misunderstandings for the others. For a moment, we can conclude that you also consider number 31 as Palandoken number for some reasons. Is that the case? If so, can you explain your logic, please?
14th May 2018, 3:12 AM
Nevfy
8th Sep 2018, 8:33 PM
🌷Ⓛⓤ𝔹𝓝ⓐ Ⓚⓗ𝔸ⓝ🌷
🌷Ⓛⓤ𝔹𝓝ⓐ Ⓚⓗ𝔸ⓝ🌷 - avatar