Go: package main

import (
        "fmt"
)

var paper [10][10]int

func main() {
        var x, y, s int
        for {
                _, err := fmt.Scanf("%d,%d,%d", &x, &y, &s)
                if err != nil {
                        break
                }

                fill(x, y, s)
        }
        var d, z int
        for i := 0; i < 10; i++ {
                for j := 0; j < 10; j++ {
                        if paper[i][j] == 0 {
                                z += 1
                        }
                        if paper[i][j] > d {
                                d += 1
                        }
                }
        }
        fmt.Printf("%d\n%d\n", z, d)
}

func fill(x int, y int, s int) {
        paper[x][y] += 1
        if x > 0 {
                paper[x-1][y] += 1
        }
        if x < 9 {
                paper[x+1][y] += 1
        }
        if y > 0 {
                paper[x][y-1] += 1
        }
        if y < 9 {
                paper[x][y+1] += 1
        }

        if s >= 2 {
                if x > 0 && y > 0 {
                        paper[x-1][y-1] += 1
                }
                if x > 0 && y < 9 {
                        paper[x-1][y+1] += 1
                }
                if x < 9 && y > 0 {
                        paper[x+1][y-1] += 1
                }
                if x < 9 && y < 9 {
                        paper[x+1][y+1] += 1
                }
        }

        if s > 2 {
                if x > 1 {
                        paper[x-2][y] += 1
                }
                if x < 8 {
                        paper[x+2][y] += 1
                }
                if y > 1 {
                        paper[x][y-2] += 1
                }
                if y < 8 {
                        paper[x][y+2] += 1
                }
        }
}

Python: p = [[0 for i in range(14)] for j in range(14)]
while True:
    try:
        x_inp, y_inp, s = map(int, input().split(","))
        x = x_inp + 2
        y = y_inp + 2
        if s == 1:
            p[y-1][x] = p[y-1][x] + 1
            p[y][x-1] = p[y][x-1] + 1
            p[y][x]   = p[y][x]   + 1
            p[y][x+1] = p[y][x+1] + 1
            p[y+1][x] = p[y+1][x] + 1
        elif s == 2:
            p[y-1][x-1] = p[y-1][x-1] + 1
            p[y-1][x]   = p[y-1][x]   + 1
            p[y-1][x+1] = p[y-1][x+1] + 1
            p[y][x-1]   = p[y][x-1]   + 1
            p[y][x]     = p[y][x]     + 1
            p[y][x+1]   = p[y][x+1]   + 1
            p[y+1][x-1] = p[y+1][x-1] + 1
            p[y+1][x]   = p[y+1][x]   + 1
            p[y+1][x+1] = p[y+1][x+1] + 1
        else:
            p[y-2][x] += 1
            p[y-1][x-1] = p[y-1][x-1] + 1
            p[y-1][x]   = p[y-1][x]   + 1
            p[y-1][x+1] = p[y-1][x+1] + 1
            p[y][x-2]   = p[y][x-2]   + 1
            p[y][x-1]   = p[y][x-1]   + 1
            p[y][x]     = p[y][x]     + 1
            p[y][x+1]   = p[y][x+1]   + 1
            p[y][x+2]   = p[y][x+2]   + 1
            p[y+1][x-1] = p[y+1][x-1] + 1
            p[y+1][x]   = p[y+1][x]   + 1
            p[y+1][x+1] = p[y+1][x+1] + 1
            p[y+2][x] += 1
    except:
        break
p_trim = [p[i][2:12] for i in range(2,12)]
p_flatten = sum(p_trim,[])
print(sum(x==0 for x in p_flatten))
print(max(p_flatten))

Python: sheet = [[0 for _ in range(10)] for _ in range(10)]

#小、中、大のインクの範囲
small_range = ((0, 0), (1, 0), (0, 1), (-1, 0), (0, -1))
middle_range = ((0, 0), (1, 0), (1, 1), (0, 1), (-1, 1), (-1, 0), (-1, -1), (0, -1), (1, -1))
large_range = ((0, 0), (1, 0), (2, 0), (1, 1), (0, 1), (0, 2), (-1, 1), (-1, 0), (-2, 0), (-1, -1), (0, -1), (0, -2), (1, -1))

#範囲内か判定してインクを足す
def drop(x, y, drop_range):
  for dx, dy in drop_range:
    newx, newy = x + dx, y + dy
    if 0 <= newx <= 9 and 0 <= newy <= 9:
      sheet[newx][newy] += 1

while True:
  try:
    x, y, s = map(int, input().split(","))

    if s == 1:
      drop(x, y, small_range)
    elif s == 2:
      drop(x, y, middle_range)
    else:
      drop(x, y, large_range)

  except EOFError:
    break

#0の個数
zero_cnt = 0

#インクの最大値
max_ink = 0

for x in range(10):
  for y in range(10):
    ink = sheet[x][y]

    if ink == 0:
      zero_cnt += 1

    if max_ink < ink:
      max_ink = ink

print(zero_cnt)
print(max_ink)

Python: import numpy as np

p = np.zeros((14,14), dtype=int)
while True:
    try:
        x_inp, y_inp, s = map(int, input().split(","))
        x = x_inp + 2
        y = y_inp + 2
        if s == 1:
            p[y-1][x] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x] += 1
        elif s == 2:
            p[y-1][x-1:x+2] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x-1:x+2] += 1
        else:
            p[y-2][x] += 1
            p[y-1][x-1:x+2] += 1
            p[y][x-2:x+3] += 1
            p[y+1][x-1:x+2] += 1
            p[y+2][x] += 1
    except:
        break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))

Python: t = [[0 for i in range(10)] for j in range(10)]
case1 = [(0, 0), (0, -1), (1, 0), (0, 1), (-1, 0)]
case2 = [(1, -1), (1, 1), (-1, 1), (-1, -1)]
case3 = [(0, -2), (2, 0), (0, 2), (-2, 0)]
while True:
    try:
        x, y, s = map(int, input().split(','))
    except:
        break
    for c in [case1, case2, case3][:s]:
        for _x, _y in c:
            try:
                t[y+_y][x+_x] += 1
            except IndexError:
                continue
print(sum(1 for l in t for v in l if not v))
print(max(v for l in t for v in l))

Python: t = [[0 for i in range(10)] for j in range(10)]
case1 = [(0, 0), (0, -1), (1, 0), (0, 1), (-1, 0)]
case2 = [(1, -1), (1, 1), (-1, 1), (-1, -1)]
case3 = [(0, -2), (2, 0), (0, 2), (-2, 0)]
while True:
    try:
        x, y, s = map(int, input().split(','))
    except:
        break
    for c in [case1, case2, case3][:s]:
        for _x, _y in c:
            try:
                t[x+_x][y+_y] += 1
            except IndexError:
                continue
print(sum(1 for l in t for v in l if not v))
print(max(v for l in t for v in l))

Python: if __name__ == '__main__':

	DI = [[0 for _ in range(10)] for _ in range(10)]

	while True:
		try:
			x,y,s = map(int,input().split(","))
			if s == 0:
				break
			if s == 1:
				#自身
				DI[x][y] += 1
				#up
				if y >= 1 :
					DI[x][y-1] += 1
				#down
				if y <= 8:
					DI[x][y+1] += 1
				#left
				if x >= 1:
					DI[x-1][y] += 1
				#right
				if x <= 8:
					DI[x+1][y] += 1

			elif s == 2:
				#自身
				DI[x][y] += 1
				#up
				if y >= 1 :
					DI[x][y-1] += 1
				#up left
				if x >= 1 and y >= 1:
					DI[x-1][y-1] += 1
				#up right
				if x <= 8 and y >= 1 :
					DI[x+1][y-1] += 1
				#down
				if y <= 8:
					DI[x][y+1] += 1
				#down left
				if x >= 1 and y <= 8:
					DI[x-1][y+1] += 1
				#down right
				if x <= 8 and y <= 8 :
					DI[x+1][y+1] += 1
				#left
				if x >= 1:
					DI[x-1][y] += 1
				#right
				if x <= 8:
					DI[x+1][y] += 1

			else:
				#自身
				DI[x][y] += 1
				#up
				if y >= 1 :
					DI[x][y-1] += 1
				#up left
				if x >= 1 and y >= 1:
					DI[x-1][y-1] += 1
				#up right
				if x <= 8 and y >= 1 :
					DI[x+1][y-1] += 1
				#up +1
				if y >= 2 :
					DI[x][y-2] += 1
				#down
				if y <= 8:
					DI[x][y+1] += 1
				#down left
				if x >= 1 and y <= 8:
					DI[x-1][y+1] += 1
				#down right
				if x <= 8 and y <= 8 :
					DI[x+1][y+1] += 1
				#down + 1
				if y <= 7:
					DI[x][y+2] += 1
				#left
				if x >= 1:
					DI[x-1][y] += 1
				#left + 1
				if x >= 2:
					DI[x-2][y] += 1
				#right
				if x <= 8:
					DI[x+1][y] += 1
				#right + 1
				if x <= 7:
					DI[x+2][y] += 1



		except EOFError:
			break

#	for j in DI:
#		print(j)

	cnt = 0
	maxcnt = 0
	for k in DI:
		cnt += k.count(0)
		if maxcnt < max(k):
			maxcnt = max(k)
	print(cnt)
	print(maxcnt)