I just came across the following puzzle on facebook. Eventually got the answer but couldn't see how a kid could get it so easily until I googled the answer and saw the simple way. . . see how you get on:<p>This problem can be solved by pre-school children in 5-10 minutes, by programmers in 1 hour, and by people with higher education… well, check it yourself!<p>8809 = 6; 7111 = 0;
2172 = 0; 6666 = 4;
1111 = 0; 3213 = 0;
7662 = 2; 9312 = 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;
9187 = 3; 2581 = ?