Tech Interview

Prime number problem

A man has to buy 7 floors in a building. Numbered floor 1 to 68.
Conditions:
1. He cannot buy floors with prime number.
2. He cannot buy floor number containing prime digit.
3. Floor number 1 is reserved for services.
4. Difference between all remaining floors shoud be different.
5. Difference between all remaing floors should not be prime.

Q1. From 1,2,3 options how many floors are legal.
Q2. From all options how many floors are legal.

Exit mobile version