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: paper = {}
counter = 0
for i in range(10):
	for j in range(10):
		paper.update({(i,j):0})
while True:
	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
	#print(paper.values())

for i in range(10):
	for j in range(10):
		if paper[(i,j)] == 0:
			counter += 1
print(counter)
print(max(paper.values()))

Python: A=[[int(0) for i in range(10)]for j in range(10)]
count=0
while 1:
    try:
        x,y,s = map(int, input().split(','))
        if s==1:
            for i in range(x-1,x+1):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]+1
            for i in range(y-1,y+1):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]+1
            A[x][y]=A[x][y]-1                    
        elif s==2:
            for i in range(x-1,x+1):
                for j in range(y-1,y+1):
                    if i>=0 and i<=9 and j>=0 and j<=9:
                        A[i][j]=A[i][j]+1
        else:
            for i in range(x-2,x+2):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]+1
            for i in range(y-2,y+2):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]+1
            for i in range(x-1,x+1):
                if i>=0 and i<=9:
                    A[i][y]=A[i][y]-1
            for i in range(y-1,y+1):
                if i>=0 and i<=9:
                    A[x][i]=A[x][i]-1
            for i in range(x-1,x+1):
                for j in range(y-1,y+1):
                    if i>=0 and i<=9 and j>=0 and j<=9:
                        A[i][j]=A[i][j]+1
    except EOFError:
        break
        
for i in range(10):
    for j in range(10):
        if A[i][j]==0:
            count=count+1
print(count)
print(max(A))

Python: # Aizu Problem 0026: Dropping Ink
#
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input.txt", "rt")


paper = [[0 for col in range(10)] for row in range(10)]

# ink forms: 1=small, 2=medium, 3=large
ink_forms = {1: [[0, 0], [-1, 0], [1, 0], [0, -1], [0, 1]],
             2: [[-1, -1], [-1, 0], [-1, 1],
                 [0, 1], [0, 0], [0, -1],
                 [1, -1], [1, 0], [1, 1]],
             3: [[-1, -1], [-1, 0], [-1, 1],
                 [0, 1], [0, 0], [0, -1],
                 [1, -1], [1, 0], [1, 1],
                 [-2, 0], [2, 0], [0, -2], [0, 2]]}

while True:
    try:
        x, y, s = [int(_) for _ in input().split(',')]
    except EOFError:
        break
    for x_off, y_off in ink_forms[s]:
        x1 = x + x_off
        y1 = y + y_off
        if 0 <= x1 < 10 and 0 <= y1 < 10:
            paper[x1][y1] += 1

print(sum([row.count(0) for row in paper]))
print(max([max(row) for row in paper]))

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

def check(x,i,y,j):
    flagx=True if (x+i>=0 and x+i<=9) else False
    flagy=True if (y+j>=0 and y+j<=9) else False

    return (flagx and flagy)

def main():
    LIST=[]
    for i in range(10):
        LIST.append([0,0,0,0,0,0,0,0,0,0])
        count=0
        M=0
    while True:
        try:
            x,y,size=map(int,input().split(","))
            if size==1:
                for i in range(-1,2):
                    for j in range(-1,2):
                        if check(x,i,y,j) and abs(i)+abs(j)<=1:
                            LIST[y+j][x+i]+=1

            elif size==2:
                for i in range(-1,2):
                    for j in range(-1,2):
                        if check(x,i,y,j) and abs(i)+abs(j)<=2:
                            LIST[y+j][x+i]+=1

            elif size==3:
                for i in range(-2,3):
                    for j in range(-2,3):
                        if check(x,i,y,j) and abs(i)+abs(j)<=2:
                            LIST[y+j][x+i]+=1
            
        except:
            break

    for item in LIST:
        tmp=max(x for x in item)
        M=max(tmp,M)

    for item in LIST:
        count+=item.count(0)

    print(count)
    print(M)
    
        
if __name__ == '__main__':
    main()

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<=9 and 0<=x+i<=9:
                    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<=9 and 0<=x+i<=9:
                    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<=9 and 0<=x+i<=9:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    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: 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)]