In a digital vault, a password consists of a four-digit number where the first digit equals the number of zeros in the entire code, the second digit equals the number of ones, the third equals the number of twos, and the fourth equals the number of threes. What is the code?
1210
In the number 1210: there is 1 zero (matching the first digit '1'), there are 2 ones (matching the second digit '2'), there is 1 two (matching the third digit '1'), and there are 0 threes (matching the fourth digit '0').
About this riddle
Logic riddles give you a few facts and ask what must be true. List what you know, cross out what cannot be, and see what is left.
Difficulty: Hard. More like this: Logic riddles with answers or try Einstein's Logic Grid for a different kind of puzzle.
More logic riddles
In a small youth club, every child plays soccer, basketball, or both. Exactly 6 children play soccer, 5 play basketball, and 2 play both sports. How many children are in the club in total?
In a drawer, there are 10 matching black socks, 10 matching white socks, and 10 matching red socks. The room is pitch black. What is the minimum number of socks you must pull out to guarantee you have at least one complete matching pair of any color?
One hundred people numbered 1 to 100 stand in a circle. Person 1 holds a sword and eliminates Person 2, passing the sword to Person 3. Person 3 eliminates Person 4 and passes to Person 5. This pattern continues in order around the circle until only one survivor remains. What is the number of the last survivor?
If two's company and three's a crowd, what are four and five?
Two mothers and two daughters went shopping together. They bought exactly three hats, and each person wore one home without sharing or carrying extras. How is this possible?
Three cars—Red, Blue, and Silver—are parked in a row. The Red car is not parked on the left end. The Silver car is parked to the immediate right of the Red car. Which car is parked on the far left?

