Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func rangeCheck(x, y int) bool {
	if x >= 0 && x <= 9 && y >= 0 && y <= 9 {
		return true
	} else {
		return false
	}
}

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	paper := make([][]int, 10)
	for i := range paper {
		paper[i] = make([]int, 10)
		for j := range paper[i] {
			paper[i][j] = 0
		}
	}
	// fmt.Println(paper)
	for scanner.Scan() {
		infos := strings.Split(scanner.Text(), ",")
		x, _ := strconv.Atoi(infos[0])
		y, _ := strconv.Atoi(infos[1])
		s, _ := strconv.Atoi(infos[2])
		// fmt.Println(x, y, s)
		switch s {
		case 1:
			paper[x][y]++
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			continue
		case 2:
			paper[x][y]++
			if rangeCheck(x-1, y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x, y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1, y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1, y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1, y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1, y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x, y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1, y+1) {
				paper[x+1][y+1]++
			}
			continue
		case 3:
			paper[x][y]++
			if rangeCheck(x-1,y-1) {
				paper[x-1][y-1]++
			}
			if rangeCheck(x,y-1) {
				paper[x][y-1]++
			}
			if rangeCheck(x+1,y-1) {
				paper[x+1][y-1]++
			}
			if rangeCheck(x-1,y) {
				paper[x-1][y]++
			}
			if rangeCheck(x+1,y) {
				paper[x+1][y]++
			}
			if rangeCheck(x-1,y+1) {
				paper[x-1][y+1]++
			}
			if rangeCheck(x,y+1) {
				paper[x][y+1]++
			}
			if rangeCheck(x+1,y+1) {
				paper[x+1][y+1]++
			}
			if rangeCheck(x,y-2) {
				paper[x][y-2]++
			}
			if rangeCheck(x-2,y) {
				paper[x-2][y]++
			}
			if rangeCheck(x+2,y) {
				paper[x+2][y]++
			}
			if rangeCheck(x,y+2) {
				paper[x][y+2]++
			}
			continue
		}
	}
	count := 0
	max := -1
	for i := range paper {
		for j := range paper[i] {
			if paper[i][j] == 0 {
				count++
			}
			if max >= paper[i][j] {
				max = max
			} else {
				max = paper[i][j]
			}
		}
	}
	fmt.Printf("%d\n%d", count, max)
}

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)

Python: import sys

def plot(x, y):
    global ban
    if 0 <= x < 10 and 0 <= y < 10: ban[y][x] += 1

def drop(x, y, s):
    for dx, dy in [(0, 0), (-1, 0), (1, 0), (0, -1), (0, 1)]:
        plot(x + dx, y + dy)
    if s == 1: return
    for dx, dy in [(-1, -1), (-1, 1), (1, -1), (1, 1)]:
        plot(x + dx, y + dy)
    if s == 2: return
    for dx, dy in [(-2, 0), (2, 0), (0, -2), (0, 2)]:
        plot(x + dx, y + dy)

ban = [[0 for x in range(10)] for y in range(10)]
for line in sys.stdin:
    x, y, size = map(int, line.split(','))
    drop(x, y, size)

print(sum(ban[y][x] == 0 for y in range(10) for x in range(10)))
print(max(ban[y][x] for y in range(10) for x in range(10)))