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: def paint(masu,data):
    masu[data[1]][data[0]]+=1                   #インクを垂らした場所
    #print(masu)
    if data[2]==1:                              #インク小の時
        if data[0]!=0:
            masu[data[1]][data[0]-1]+=1
        if data[0]!=9:
            masu[data[1]][data[0]+1]+=1
        if data[1]!=0:
            masu[data[1]-1][data[0]]+=1
        if data[1]!=9:
            masu[data[1]+1][data[0]]+=1
        #print("小の時",masu)
    elif data[2]==2:                            #インク中の時
        if data[0]!=0:
            masu[data[1]][data[0]-1]+=1
        if data[0]!=9:
            masu[data[1]][data[0]+1]+=1
        if data[1]!=0:
            masu[data[1]-1][data[0]]+=1
        if data[1]!=9:
            masu[data[1]+1][data[0]]+=1
        if data[1]!=9 and data[0]!=9:
            masu[data[1]+1][data[0]+1]+=1
        if data[1]!=9 and data[0]!=0:
            masu[data[1]+1][data[0]-1]+=1
        if data[1]!=0 and data[0]!=9:
            masu[data[1]-1][data[0]+1]+=1
        if data[1]!=0 and data[0]!=0:
            masu[data[1]-1][data[0]-1]+=1
        #print("中の時",masu)
    elif data[2]==3:                            #インク大の時
        if data[0]!=0:
            masu[data[1]][data[0]-1]+=1
        if data[0]!=9:
            masu[data[1]][data[0]+1]+=1
        if data[1]!=0:
            masu[data[1]-1][data[0]]+=1
        if data[1]!=9:
            masu[data[1]+1][data[0]]+=1
        if data[1]!=9 and data[0]!=9:
            masu[data[1]+1][data[0]+1]+=1
        if data[1]!=9 and data[0]!=0:
            masu[data[1]+1][data[0]-1]+=1
        if data[1]!=0 and data[0]!=9:
            masu[data[1]-1][data[0]+1]+=1
        if data[1]!=0 and data[0]!=0:
            masu[data[1]-1][data[0]-1]+=1
        if data[1]>=2:
            masu[data[1]-2][data[0]]+=1
        if data[1]<=7:
            masu[data[1]+2][data[0]]+=1
        if data[0]>=2:
            masu[data[1]][data[0]-2]+=1
        if data[0]<=7:
            masu[data[1]][data[0]+2]+=1
        #print("大の時",masu)
    return masu

masu=[
        [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]
    ]



def keisan(masu):
    max=0
    num1=0
    for na in range(10):
        for ma in range(10):
            if masu[na][ma]==0:
                num1+=1
            if masu[na][ma]>max:
                max=masu[na][ma]
    print(num1)
    print(max)

while True:
    try:
        x,y,s=list(map(int, input().split(',')))
        data=[x,y,s]   
        masu2=paint(masu,data)
    except:
        break

    
    #print("masu",masu2)
#print("masu2",masu2)
keisan(masu2)

Python: # -*- coding: utf-8 -*-

import sys
import os
import math

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

def paint(x, y):
    if 0 <= x <= 9 and 0 <= y <= 9:
        P[x][y] += 1

for s in sys.stdin:
    x, y, s = map(int, s.split(','))

    if s >= 1:
        paint(x, y)
        paint(x - 1, y)
        paint(x + 1, y)
        paint(x, y - 1)
        paint(x, y + 1)

    if s >= 2:
        paint(x - 1, y - 1)
        paint(x + 1, y - 1)
        paint(x - 1, y + 1)
        paint(x + 1, y + 1)

    if s >= 3:
        paint(x - 2, y)
        paint(x + 2, y)
        paint(x, y - 2)
        paint(x, y + 2)

    # debug
    #print('-----------------------')
    #for row in P:
    #    print(*row)

white = 0
for row in P:
    white += row.count(0)

max_value = 0
for row in P:
    max_value = max(max_value, max(row))

print(white)
print(max_value)

Python: def get_input():
    while True:
        try:
            yield ''.join(input())
        except EOFError:
            break

N = list(get_input())
board = [[0 for i in range(14)] for j in range(14)]
for l in range(0,len(N)):
    x,y,s = [int(i) for i in N[l].split(",")]
    x = x + 2
    y = y + 2
    if s >= 1:
        board[x+1][y] += 1
        board[x-1][y] += 1
        board[x][y+1] += 1
        board[x][y-1] += 1
        board[x][y] += 1
    if s >= 2:
        board[x+1][y+1] += 1
        board[x+1][y-1] += 1
        board[x-1][y+1] += 1
        board[x-1][y-1] += 1
    if s >= 3:
        board[x+2][y] += 1
        board[x-2][y] += 1
        board[x][y+2] += 1
        board[x][y-2] += 1

a = 0
b = 0
for i in range(2,12):
    for j in range(2,12):
        if board[i][j] == 0:
            a += 1
        if board[i][j] > b:
            b = board[i][j]

print(a)
print(b)

Python: import sys,collections
c=[tuple([i,j]) for i in range(10) for j in range(10)]
d=[list(map(int,text.split(","))) for text in sys.stdin]
o=[]
for b in d:
    if b[2]==1:
        t=[tuple([b[0]+i,b[1]+j]) for i in range(-1,2) for j in range(-1,2) if (i==0 or j==0) and 0<=b[0]+i<=9 and 0<=b[1]+j<=9]
    elif b[2]==2:
        t=[tuple([b[0]+i,b[1]+j]) for i in range(-1,2) for j in range(-1,2) if 0<=b[0]+i<=9 and 0<=b[1]+j<=9]
    elif b[2]==3:
        t=[tuple([b[0]+i,b[1]+j]) for i in range(-2,3) for j in range(-2,3) if abs(i)+abs(j)<=2 and 0<=b[0]+i<=9 and 0<=b[1]+j<=9]
    o+=t
print(len(set(c)-set(o)))
print(sorted(collections.Counter(o).values())[-1])

Python: mat = []
for i in range(10):
    mat.append([0]*10)

while True:
    try:
        lst = list(map(int, input().split(',')))
        x, y, s = lst[0], lst[1], lst[2]
        
        if s == 1:
            tmplst = [[x, y], [x, y-1], [x-1, y], [x+1, y], [x, y+1]]

        elif s == 2:
            tmplst = [[x, y], [x, y-1], [x-1, y], [x+1, y], [x, y+1], [x-1, y-1], [x+1, y-1], [x-1, y+1], [x+1, y+1]]

        else:
            tmplst = [[x, y], [x, y-1], [x-1, y], [x+1, y], [x, y+1], [x-1, y-1], [x+1, y-1], [x-1, y+1], [x+1, y+1], [x, y-2], [x-2, y], [x+2, y], [x, y+2]]

        for i in tmplst:
            if i[0] < 0 or i[0] > 9 or i[1] < 0 or i[1] > 9:
                pass
            else:
                mat[i[1]][i[0]] +=1
        
    except EOFError:
        break

summat = 0
maxmat = 0
for j in mat:
    summat += j.count(0)
    if maxmat < max(j):
        maxmat = max(j)

print(summat)
print(maxmat)