# Find the five digit number $N$ by the clues!

I was preparing for a competition, and I encountered the following problem.

In a classroom, the teacher said to five students, Alan, Bob, Carl, Dick and Eason, ‘I have written down a five-digit number $$N$$ which is made up of five different digits. I will let Alan see the ten thousands and thousands digits of $$N$$, let Bob see the thousands and hundreds digits, let Carl see the hundreds and tens digits, let Dick see the tens and unit digits and let Eason see the unit and ten thousands digits.’ The teacher then let each student know two digits of $$N$$ as said, and then everybody sat in a circle and started the following conversation.

‘Raise your hands if you know a prime factor of $$N$$,’ said the teacher, and then two students raised their hands.

‘Raise your hands if you know a prime factor of $$N$$,’ asked the teacher again, and this time three students raised their hands.

‘Raise your hands if you know a composite factor of $$N$$,’ the teacher continued, and then two students raised their hands.

‘Raise your hands if you know two composite factors of $$N$$,’ said the teacher, but no student raised their hands.

Then the teacher asked, ‘who knows the value of $$N$$?’

One student said, ‘I know. N is a multiple of $$59$$.’

Assuming all students to be clever (which means that deductions can be made whenever sufficient information is given), find $$N$$.

I knew that $$N$$ is divisible by $$2$$ or $$5$$, by the first question asked by the teacher.

I knew that $$N$$ is divisible by $$2$$, and the ten thousands digit or the tens digit is $$5$$ by the second question asked by the teacher. (Think the reason by yourself. Actually I asked for help for this deduction.)

Then I am stuck.

Can someone help me? Any help is appreciated!

Source

• Hey with the info from the replies to first question, how did the third student know a prime factor ? Aug 17, 2019 at 8:21
• Obviously one of the people who doesn't see the units digit has 0 and 5 as their two digits so they can conclude that the number must be even.
– user694818
Aug 17, 2019 at 9:30
• @MatthewDaly Not so, just needs $5$ ... Aug 17, 2019 at 10:02
• Agreed. And that has to be either the tens or ten thousands digit because otherwise two extra people would have noticed.
– user694818
Aug 17, 2019 at 10:26
• As for the next step, if the number was ???52 or ???56, two people would know that it was divisible by 4, and if it was ????0, two people would know that it was divisible by 10 (although it couldn't be ???50 because then two people would know that it had more than two composite factors).
– user694818
Aug 17, 2019 at 14:59