Squares Fixed by nn

a=[' ']*2e3
i=0
System.in.eachLine{j=0;i+=80;it.each{it-'.'||[a[k=i+j]=a[k+2]='|',a[k+1]=a[k-79]='_'];j+=2}}
20.times{println a[80*it..<80*-~it].sum()-~/ *$/}

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

download

return to the top page