ENG  RUS Timus Online Judge
Online Judge
Problems
Authors
Online contests
Site news
Webboard
Problem set
Submit solution
Judge status
Guide
Register
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

## Discussion of Problem 1586. Threeprime Numbers

What is three prime number?
Posted by Nikola 2 May 2008 18:18
Can anyone help me please? I don't understand what is three prime number? :S
Re: What is three prime number?
Posted by borisgrubic 3 May 2008 13:50
My english is not good...
Let my try to explane you on example:
**************************************
1274 - not

this is not three prime number because

127 - this is 3.-digit prime nubmer , but
274 - this is not 3.-digit prime number...
***************************************
1137 - is

this is three prime number because

113 - this is 3.-digit prime number, and
137 - this is 3.-digit prime number
***************************************

So every 3 consecutive digits in number X must be 3.-digit prime number...

I hope this help...
Re: What is three prime number?
Posted by Nebojsa 3 May 2008 17:22
It's not true number is three digits prime number if any three digits are prime
Re: What is three prime number?
Posted by diver_ru (Fishburg SAAT) 3 May 2008 19:23
"Pasha calls an integer a threeprime number if any three consecutive digits of this integer form a three-digit prime number."
So if we write number A as A[1]A[2]...A[n] (A[i] - i-th digit of this number), than whole number A will be 'threeprime' if and only if for each i=1,2..., n-2 number A[i]A[i+1]A[i+2] is prime number.
Re: What is three prime number?
Posted by Nikola 4 May 2008 06:11
I understand now. Thanks a lot guys. The problem won't be problem anymore :)

Edit: Except one more thing? 3 digit number is threeprime only if the number is prime right?

Example: 101 is prime number so that means it's also a threeprime number right? Or that's not always right?
Edited by author 04.05.2008 06:39

Edited by author 04.05.2008 06:47
Re: What is three prime number?
Posted by iOli 20 Dec 2017 20:54
Thank you very much :)