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: 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