m@main=do l<-getLine;print$minimum[sum[min=<<(-)10$abs$a-read[b]|b<-l]|a<-[0..9]];m
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page