Squares Round 2 by nn

D='  '
p=D*9
"$System.in\n".eachLine{c=it+D*9
2.times{println((0..15).sum{j->(p[j-1,j]-D?'|':' ')+(!it&&p[j]+c[j]-D?'_':' ')*3}-~/ *$/)
p=c}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page