A party is being held at a local mansion. The host is very rich and his success is because of one thing — his famous recipe for Spaghetti!
The only guests that may attend are people who correctly reply to the guard at the door.
Here's where you come in. You and a friend are trying to steal this recipe. You sneak by and listen to the passwords.
The first guest arrives. The security says "5", and the guest replies "0".
The second guest arrives. The security says "6", the guest replies "1".
The third guest arrives. The security says "3", the guest replies "0".
Your friend thinks he's got it all figured out so he walks up to the door and the security says "2". He replied "1", and is chased by dogs for stating an incorrect password.
Another guest arrives, you seem to get the same pattern, security says "1" and he says "0" to get in.
You now walk up to security and get "7", what is the correct response?
hint 1:
Another guest arrives, you seem to get the same pattern, security says "8" and he says "2" to get in.
hint 2:
Another guest arrives, you seem to get the same pattern, security says "0" and he says "1" to get in.
No computations are needed for this problem so please don't answer using complex equations, it's just simple logic.
Thanks for the ideas, credits to:
Part 1 was created by warspyking and is found here: The Security to the Party
Part 2 in Mew's version The Security to the Party [Part 2]