#!ruby -p X=10 s=0 c=proc{j=$`.size;$_[15]?1+j%2*2:14-j} scan(/\d|X/){s+=c[]*eval($&)} sub('?'){(0..9).find{|v|(s+v*c[])%($_[17]||11)<1}}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page