\ This problem can be solved by pre-school children in 5-10 minutes.
\ By programmers - in 1 hour.
\ By people with higher education... well, check it yourself!

\ Typical use:
\   4th cxq smaltest.4th 2581

\ 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

\ 2581 = ?

offset map 1 c, 0 c, 0 c, 0 c, 0 c, 0 c, 1 c, 0 c, 2 c, 1 c,

argn 2 < abort" Usage: smaltest [sequence]"
0 1 args bounds ?do i c@ [char] 0 - map + loop . cr

