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...紙全体、sheet[x][y]は(x, y)のインクの濃さ
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: 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)