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: p = [[0] * 10 for _ in range(10)]
x, y, s = 0, 0, 0
while True:
    try:
        x, y, s = map(int, input().split(","))
    except:
        break

    if s >= 1:
        p[x][y] += 1
        for i in range(x-1, x+2, 2):
            if -1 < i < 10:
                p[i][y] += 1
        for i in range(y-1, y+2, 2):
            if -1 < i < 10:
                p[x][i] += 1

    if s >= 2:
        for i in range(x-1, x+2, 2):
            for j in range(y-1, y+2, 2):
                if -1 < i < 10 and -1 < j < 10:
                    p[i][j] += 1

    if s == 3:
        for i in range(x-2, x+3, 4):
            if -1 < i < 10:
                p[i][y] += 1
        for i in range(y-2, y+3, 4):
            if -1 < i < 10:
                p[x][i] += 1

cnt_0 = 0
max_inc = 0

for l in p:
    cnt_0 += l.count(0)
    max_inc = max(l + [max_inc])

print(cnt_0)
print(max_inc)

Python: p = np.zeros((14,14), dtype=int)
while True:
    try:
        x_inp, y_inp, s = map(int, input().split(","))
        x = x_inp + 2
        y = y_inp + 2
        if s == 1:
            p[y-1][x] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x] += 1
        elif s == 2:
            p[y-1][x-1:x+2] += 1
            p[y][x-1:x+2] += 1
            p[y+1][x-1:x+2] += 1
        else:
            p[y-2][x] += 1
            p[y-1][x-1:x+2] += 1
            p[y][x-2:x+3] += 1
            p[y+1][x-1:x+2] += 1
            p[y+2][x] += 1
    except:
        break
p_trim = p[2:12,2:12]
print(len(np.where(p_trim==0)[0]))
print(np.max(p_trim))

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)
    print(x,y,z)
    drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1

print(n)
print(m)

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

def drop_ink(x, y, s):
    for i in range(-1, 2):
        for j in range(-1, 2):
            if s == 1 and i * j != 0:
                continue
            if 0 <= x + i < 10 and 0 <= y + j < 10:
                paper[x+i][y+j] += 1
    if s == 3:
        if x - 2 >= 0:
            paper[x-2][y] += 1
        if x + 2 < 10:
            paper[x+2][y] += 1
        if y - 2 >= 0:
            paper[x][y-2] += 1
        if y + 2 < 10:
            paper[x][y+2] += 1

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

count = 0
max_density = 0
for i in range(10):
    for j in range(10):
        if paper[i][j] == 0:
            count += 1
        elif paper[i][j] > max_density:
            max_density = paper[i][j]
print(count)
print(max_density)

Python: peper=[[0 for i in range(14)]for j in range(14)]
while True:
    try:
        x,y,s=map(int,input().split(","))
        x +=2
        y +=2
        if s==3:
            peper[y][x] +=1
            peper[y][x-1] +=1
            peper[y][x-2] +=1
            peper[y][x+1] +=1
            peper[y][x+2] +=1
            peper[y-1][x] +=1
            peper[y-2][x] +=1
            peper[y+1][x] +=1
            peper[y+2][x] +=1
            peper[y-1][x-1] +=1
            peper[y-1][x+1] +=1
            peper[y+1][x-1] +=1
            peper[y+1][x+1] +=1
        elif s==2:
            peper[y][x] +=1
            peper[y][x+1] +=1
            peper[y][x-1] +=1
            peper[y+1][x] +=1
            peper[y+1][x+1] +=1
            peper[y+1][x-1] +=1
            peper[y-1][x] +=1
            peper[y-1][x+1] +=1
            peper[y-1][x-1] +=1
        elif s==1:
            peper[y][x] +=1
            peper[y+1][x] +=1
            peper[y-1][x] +=1
            peper[y][x+1] +=1
            peper[y][x-1] +=1
    except:
        co=0
        ma=0
        for i in range(2,12):
            for j in range(2,12):
                if peper[i][j]==0:
                    co +=1
                else:
                    ma=max(ma,peper[i][j])
        print(co)
        print(ma)
        break

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