Minesweeper by Puzzlet Chung (2hrs)

import sys
b=sys.stdin.read(271)
print''.join([str(sum(b[i+k]=='*'for k in[-18,-17,-16,-1,1,16,17,18]if 0<=i+k<271)),c][c!='.']for(i,c)in enumerate(b))

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

download

return top