Created
February 11, 2012 21:54
-
-
Save Xion/1804474 to your computer and use it in GitHub Desktop.
A neat little numerical puzzle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This puzzle is (allegedly) solved by elementary school children in 5 to 10 minutes, | |
but adults usually struggle with it much longer. | |
8809=6 | |
7111=0 | |
2172=0 | |
6666=4 | |
1111=0 | |
3213=0 | |
7662=2 | |
9313=1 | |
0000=4 | |
2222=0 | |
3333=0 | |
5555=0 | |
8193=3 | |
8096=5 | |
7777=0 | |
9999=4 | |
7756=1 | |
6855=3 | |
9881=5 | |
5531=0 | |
2581=? | |
(Bonus: Write a program that computes this function) | |
(Hint #1: It's language-agnostic. Actual numbers matter, not their names.) | |
(Hint #2: The program would take like 3-4 lines tops in most languages.) | |
(Hint #3: The function does not have well-defined value for certain class of inputs.) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment