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: pap = [[0 for x in range(10)] for y in range(10)]

def brot(x,y,s):
    if s==1:
        for dx in range(-1,+1+1):
            for dy in range(-1,+1+1):
                px = x + dx    
                py = y + dy
                if abs(dx)+abs(dy)<2 and px in range(0,10) and py in range(0,10):
                    pap[py][px] += 1
    elif s==2:
        for dx in range(-1,+1+1):
            for dy in range(-1,+1+1):
                px = x + dx    
                py = y + dy
                if px in range(0,10) and py in range(0,10):
                    pap[py][px] += 1
    elif s==3:
        for dx in range(-2,+2+1):
            for dy in range(-2,+2+1):
                px = x + dx    
                py = y + dy
                if abs(dx)+abs(dy)<3 and px in range(0,10) and py in range(0,10):
                    pap[py][px] += 1
    else:
        raise(ValueError) 

def ans():
    bmax = 0
    wcount = 0
    for y in range(0,+9+1):
        for x in range(0,+9+1):
            b = pap[y][x]
            if b > bmax:
                bmax = b
            elif b == 0:
                wcount += 1
    return(wcount,bmax)

while True:
    try:
        x,y,s = list(map(int, input().split(',')))
        brot(x,y,s)
    except EOFError:
       break

print("%d\n%d" % ans())

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)
print(r2)

Python: paper = [0 for x in range(10) for y in range(10)]

while True :
    try:
        x, y, ink = [int(_) for _ in input().split(',')]
        temp = (x - 1) + y * 10
        spot = [temp]
        for _ in 1, 10 :
            if temp + _ > 0 : spot.append(temp + _)
            if temp - _ > 0 : spot.append(temp - _)
        if ink == 2 or ink == 3 :
            for _ in 9, 11 :
                if temp + _ > 0 : spot.append(temp + _)
                if temp - _ > 0 : spot.append(temp - _)
            if ink == 3 :
                for _ in 2, 20 :
                    if temp + _ > 0 : spot.append(temp + _)
                    if temp - _ > 0 : spot.append(temp - _)
        for _ in spot : paper[_] += 1
    except : break

none = 0
for _ in paper : 
    if _ == 0 : none += 1
print(none, max(paper))

Python: import sys
mat=[[0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0],
     [0,0,0,0,0,0,0,0,0,0]]
c=0
max=0

for line in sys.stdin.readlines():

    y, x, s=map(int,line.split(','))
    if(s==1):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
    elif(s==2):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
        mat[x-1][y+1]=mat[x-1][y+1]+1
        mat[x-1][y-1]=mat[x-1][y-1]+1
        mat[x+1][y+1]=mat[x+1][y+1]+1
        mat[x+1][y-1]=mat[x+1][y-1]+1
    elif(s==3):
        mat[x][y]=mat[x][y]+1
        mat[x][y+1]=mat[x][y+1]+1
        mat[x-1][y]=mat[x-1][y]+1
        mat[x][y-1]=mat[x][y-1]+1
        mat[x+1][y]=mat[x+1][y]+1
        mat[x-1][y+1]=mat[x-1][y+1]+1
        mat[x-1][y-1]=mat[x-1][y-1]+1
        mat[x+1][y+1]=mat[x+1][y+1]+1
        mat[x+1][y-1]=mat[x+1][y-1]+1
        mat[x-2][y]=mat[x-2][y]+1
        mat[x+2][y]=mat[x+2][y]+1
        mat[x][y+2]=mat[x][y+2]+1
        mat[x][y-2]=mat[x][y-2]+1
for i in range(10):
    for j in range(10):
        if(mat[i][j]==0):
            c=c+1
        if(mat[i][j]>max):
            max=mat[i][j]
print(c)
print(max)

Python: paper = [0 for x in range(10) for y in range(10)]

while True :
    try:
        x, y, ink = [int(_) for _ in input().split(',')]
        temp = (x - 1) + y * 10
        spot = [temp]
        for _ in 1, 10 :
            if temp + _ > 0 : spot.append(temp + _)
            if temp - _ > 0 : spot.append(temp - _)
        if ink == 2 or ink == 3 :
            for _ in 9, 11 :
                if temp + _ > 0 : spot.append(temp + _)
                if temp - _ > 0 : spot.append(temp - _)
            if ink == 3 :
                for _ in 2, 20 :
                    if temp + _ > 0 : spot.append(temp + _)
                    if temp - _ > 0 : spot.append(temp - _)
        for _ in spot : paper[_] += 1
    except : break

none = 0
for _ in paper : 
    if _ == 0 : none += 1
print(none)
print(max(paper))

Python: import numpy as np