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\n", count, max)
}

Python: d = [[0] * 10 for i in range(10)]

def b(x, y):
    for i in range(x - 2, x + 3):
        a = 3 - abs(x - i)
        for a in range(y - a + 1, y + a):
            if 0 <= i < 10 and 0 <= a < 10:
                d[a][i] += 1


def m(x, y):
    for i in range(x - 1, x + 2):
        for j in range(y - 1, y + 2):
            if 0 <= i < 10 and 0 <= j < 10:
                d[j][i] += 1


def s(x, y):
    r = (1, 0)
    for i in range(x - 1, x + 2):
        a = abs(x - i)
        for j in range(y - r[a], y + r[a] + 1):
            if 0 <= i < 10 and 0 <= j < 10:
                d[j][i] += 1

while 1:
    try:
        f = (None, s, m, b)
        x, y, size = list(map(int, input().split(',')))
        f[size](x, y)

    except:
        break


r1 = r2 = 0
for i in range(10):
    for j in range(10):
        r1 += 1 if d[i][j] == 0 else 0
        r2 = max(r2, d[i][j])

print(r1, r2)

Python: paper = [[0] * 10 for i in range(10)]

while True:
    try:
        x,y,s = map(int,input().split(','))
    except:
        break
    if s == 1:
        for i in range(10):
            for j in range(10):
                if abs(x - i) + abs(y - j) <= 1:
                    paper [i] [j] += 1
    elif s == 2:
        for i in range(10):
            for j in range(10):
                if abs(x - i) <= 1 and abs(y - j) <= 1:
                    paper [i] [j] += 1
    else:
        for i in range(10):
            for j in range(10):
                if abs(x - i) + abs(y - j) <= 2:
                    paper [i] [j] += 1

ls = sum(paper,[])
print(ls.count(0))
print(max(ls))

Python: paper = {}
counter = 0
i = 0
for i in range(10):
	for j in range(10):
		paper.update({(i,j):0})
while i < 50:
	try:
		x, y, s = list(map(int,input().split(",")))
	except:
		break
	if x - 1 < 0 and  x - 2 < 0 and  x - 3 < 0 and y - 1 < 0 and y - 2 < 0 and  y - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x,y+2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
		paper[(x,y)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
	elif x - 1 < 0 and  x - 2 < 0 and  x - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x,y+2)] += 1
			paper[(x,y-2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
			paper[(x+1,y-1)] += 1
		paper[(x,y)] += 1
		paper[(x,y-1)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
	elif y - 1 < 0 and y - 2 < 0 and  y - 3 < 0:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x-2,y)] += 1
			paper[(x,y+2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
			paper[(x-1,y+1)] += 1
		paper[(x,y)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
		paper[(x-1,y)] += 1
	else:
		if s == 3:
			paper[(x+2,y)] += 1
			paper[(x-2,y)] += 1
			paper[(x,y+2)] += 1
			paper[(x,y-2)] += 1
		if s >= 2:
			paper[(x+1,y+1)] += 1
			paper[(x+1,y-1)] += 1
			paper[(x-1,y+1)] += 1
			paper[(x-1,y-1)] += 1
		paper[(x,y)] += 1
		paper[(x,y-1)] += 1
		paper[(x,y+1)] += 1
		paper[(x+1,y)] += 1
		paper[(x-1,y)] += 1
	i += 1

for i in range(10):
	for j in range(10):
		if paper[(i,j)] == 0:
			counter += 1
print(counter)
print(max(paper.values()))

Python: import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    drop(x,y,z)

Python: board = [[0]*10 for _ in range(10)]
while True:
    try:
        x, y, size = map(int, input().split(','))
    except:
        break
    small = [(-1, 0), (0, -1), (0, 0), (0, 1), (1, 0)]
    med = [(-1, -1), (-1, 0), (-1, 1),
           (0, -1), (0, 0), (0, 1),
           (1, -1), (1, 0), (1, 1)]
    large = [(-2, 0),
             (-1, -1), (-1, 0), (-1, 1),
             (0, -2), (0, -1), (0, 0), (0, 1), (0, 2),
             (1, -1), (1, 0), (1, 1),
             (2, 0)]
    dyx = [small, med, large][size-1]
    for dy, dx in dyx:
        ny, nx = y + dy, x + dx
        if 0 <= nx < 10 and 0 <= ny < 10:
            board[ny][nx] += 1

print(sum(sum(1 for i in range(10) if row[i] == 0) for row in board))
print(max([max(row) for row in board]))

Python: Masu = []
def access(x,y):
    if x < 0 or y < 0 or x > 9 or y > 9:
        return
    Masu[y][x] += 1

for i in range(10):
    Masu.append([0,0,0,0,0,0,0,0,0,0])
kosu = 0
komax = 0
while True:
    try:
        
        x,y,s = map(int,input().split(","))
        if s == 1:
            for j in range(3):
                access(y +1 - j,x)
            access(y,x - 1)
            access(y,x + 1)

        elif s == 2:
            for k in range(3):
                for l in range(3):
                    access(y + 1 - k,x + 1 -l)
        elif s == 3:
            for k in range(3):
                for l in range(3):
                    access(y + 1 - k,x + 1 -l)
            access(y - 2,x)
            access(y + 2,x)
            access(y,x + 2)
            access(y,x - 2)
               
    except (EOFError,ValueError):
        for i in range(10):
            kosu += Masu[i].count(0)
        for j in range(10):
            if komax < max(Masu[j]):
                komax = max(Masu[j])
        print(kosu)
        print(komax)
        break