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!