Problem:

Official House

You manage 4 buildings, each of which has 3 floors, each of which consists of 10 rooms. Write a program which reads a sequence of tenant/leaver notices, and reports the number of tenants for each room.

  For each notice, you are given four integers b, f, r and v which represent that v persons entered to room r of fth floor at building b. If v is negative, it means that &minus;v persons left.

Assume that initially no person lives in the building. 

Input

  In the first line, the number of notices n is given. In the following n lines, a set of four integers b, f, r and v which represents ith notice is given in a line. 

Output

For each building, print the information of 1st, 2nd and 3rd floor in this order. For each floor information, print the number of tenants of 1st, 2nd, .. and 10th room in this order. Print a single space character before the number of tenants. Print "####################" (20 '#') between buildings.

Constraints

No incorrect building, floor and room numbers are given.

0 ≤ the number of tenants during the management ≤ 9

Sample Input

3
1 1 3 8
3 2 2 7
4 3 8 1

Sample Output

 0 0 8 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 7 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 1 0 0



Sample input:
3
1 1 3 8
3 2 2 7
4 3 8 1


Sample output:
 0 0 8 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 7 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 1 0 0

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[[[0 for _ in range(10)]for _ in range(3)]for _ in range(4)]
for i in range(n):
    b,f,r,v=map(int, input().split())
    a[b-1][f-1][r-1]+=v
for bb in range(b):
    for ff in range(f):
        print(*a[bb][ff])
    if bb==2:
        break
    else:
        print("#"*20)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[[[0 for _ in range(10)]for _ in range(3)]for _ in range(4)]
for i in range(n):
    b,f,r,v=map(int, input().split())
    a[b-1][f-1][r-1]+=v
for bb in range(b):
    for ff in range(f):
        print(*[""]+a[bb][ff])
    if bb==2:
        break
    else:
        print("#"*20)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[[[0 for _ in range(10)]for _ in range(3)]for _ in range(4)]
for i in range(n):
    b,f,r,v=map(int, input().split())
    a[b-1][f-1][r-1]+=v
for bb in range(b):
    for ff in range(f):
        print(*[""]+a[bb][ff])
    if bb==3:
        break
    else:
        print("#"*20)

Submission status: Wrong Answer

Solution code:
n=int(input())
start=[[[0 for i in range(10)] for j in range(3)] for k in range(4)]
for i in range(n):
    b,f,r,v=[int(i) for i in input().split()]
    start[b-1][f-1][r-1]+=v
for i in range(4):
    for j in range(3):
        for k in range(10):
            print(" ",end="")
            print(start[i][j][k],end="")
        print()
    for m in range(20):
        print("#",end="")
    print()

Submission status: Wrong Answer

Solution code:
bil_date = []
for i in range(4):
    bil_date.append([[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]])
all_date_amo = int(input())
for i in range(all_date_amo):
    date = [int(indate) for indate in input().split()]
    bil_date[date[0]-1][date[1]-1][date[2]-1] = date[3]
    
for bil in bil_date:
    for flo in bil:
        for room in flo:
            print(' {}'.format(room),end='')
        print('')
    for i in range(20):
        print('#',end='')
    print('')

Submission status: Wrong Answer

Solution code:
bil_date = []
flag = 0
for i in range(4):
    bil_date.append([[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]])
all_date_amo = int(input())
for i in range(all_date_amo):
    date = [int(indate) for indate in input().split()]
    bil_date[date[0]-1][date[1]-1][date[2]-1] = date[3]
    
for bil in bil_date:
    for flo in bil:
        for room in flo:
            print(' {}'.format(room),end='')
        print('')
    if flag == 3:
        pass
    else:
        for i in range(20):
            print('#',end='')
        print('')
    flag = flag + 1

Submission status: Wrong Answer

Solution code:
num = input()
L = []
house = []
for i in range(int(num)):
    k = input().split()
    k[0] = int(k[0])
    k[1] = int(k[1])
    k[2] = int(k[2])
    k[3] = int(k[3])
    L.append(k)

for i in range(3):
    a = ["0","0","0","0","0","0","0","0","0","0","0"]
    b = ["0","0","0","0","0","0","0","0","0","0","0"]
    c = ["0","0","0","0","0","0","0","0","0","0","0"]
    d = ["#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#","#"]
    house.append([a,b,c,d])

a = ["0","0","0","0","0","0","0","0","0","0","0"]
b = ["0","0","0","0","0","0","0","0","0","0","0"]
c = ["0","0","0","0","0","0","0","0","0","0","0"]
house.append([a,b,c])

for i in L:
    house[i[0]-1][i[1]-1][i[2]-1] = str(i[3])

for i in house:
    for j in i:
        k = "".join(j)
        print(k)

Submission status: Wrong Answer

Solution code:
num = input()
L = []
house = []
for i in range(int(num)):
    k = input().split()
    k[0] = int(k[0])
    k[1] = int(k[1])
    k[2] = int(k[2])
    k[3] = int(k[3])
    L.append(k)

for i in range(3):
    a = ["0","0","0","0","0","0","0","0","0","0","0"]
    b = ["0","0","0","0","0","0","0","0","0","0","0"]
    c = ["0","0","0","0","0","0","0","0","0","0","0"]
    d = ["#"*20]
    house.append([a,b,c,d])

a = ["0","0","0","0","0","0","0","0","0","0","0"]
b = ["0","0","0","0","0","0","0","0","0","0","0"]
c = ["0","0","0","0","0","0","0","0","0","0","0"]
house.append([a,b,c])

for i in L:
    house[i[0]-1][i[1]-1][i[2]-1] = str(i[3])

for i in house:
    for j in i:
        k = " ".join(j)
        print(k)

Submission status: Wrong Answer

Solution code:
num = input()
L = []
house = []
for i in range(int(num)):
    k = input().split()
    k[0] = int(k[0])
    k[1] = int(k[1])
    k[2] = int(k[2])
    k[3] = int(k[3])
    L.append(k)

for i in range(3):
    a = ["","0","0","0","0","0","0","0","0","0","0","0"]
    b = ["","0","0","0","0","0","0","0","0","0","0","0"]
    c = ["","0","0","0","0","0","0","0","0","0","0","0"]
    d = ["#"*20]
    house.append([a,b,c,d])

a = ["","0","0","0","0","0","0","0","0","0","0","0"]
b = ["","0","0","0","0","0","0","0","0","0","0","0"]
c = ["","0","0","0","0","0","0","0","0","0","0","0"]
house.append([a,b,c])

for i in L:
    house[i[0]-1][i[1]-1][i[2]-1] = str(i[3])

for i in house:
    for j in i:
        k = " ".join(j)
        print(k)

Submission status: Wrong Answer

Solution code:
num = input()
L = []
house = []
for i in range(int(num)):
    k = input().split()
    k[0] = int(k[0])
    k[1] = int(k[1])
    k[2] = int(k[2])
    k[3] = int(k[3])
    L.append(k)

for i in range(3):
    a = ["","0","0","0","0","0","0","0","0","0","0","0"]
    b = ["","0","0","0","0","0","0","0","0","0","0","0"]
    c = ["","0","0","0","0","0","0","0","0","0","0","0"]
    d = ["#"*20]
    house.append([a,b,c,d])

a = ["","0","0","0","0","0","0","0","0","0","0","0"]
b = ["","0","0","0","0","0","0","0","0","0","0","0"]
c = ["","0","0","0","0","0","0","0","0","0","0","0"]
house.append([a,b,c])

for i in L:
    house[i[0]-1][i[1]-1][i[2]] = str(i[3])

for i in house:
    for j in i:
        k = " ".join(j)
        print(k)

Submission status: Wrong Answer

Solution code:
num = input()
L = []
house = []
for i in range(int(num)):
    k = input().split()
    k[0] = int(k[0])
    k[1] = int(k[1])
    k[2] = int(k[2])
    k[3] = int(k[3])
    L.append(k)

for i in range(3):
    a = ["","0","0","0","0","0","0","0","0","0","0"]
    b = ["","0","0","0","0","0","0","0","0","0","0"]
    c = ["","0","0","0","0","0","0","0","0","0","0"]
    d = ["#"*20]
    house.append([a,b,c,d])

a = ["","0","0","0","0","0","0","0","0","0","0"]
b = ["","0","0","0","0","0","0","0","0","0","0"]
c = ["","0","0","0","0","0","0","0","0","0","0"]
house.append([a,b,c])

for i in L:
    house[i[0]-1][i[1]-1][i[2]] = str(i[3])

for i in house:
    for j in i:
        k = " ".join(j)
        print(k)

Submission status: Wrong Answer

Solution code:
n = int(input())
values = [input().split() for i in range(n)]

# Initialize Array
a = [["#" if i > 0 and i % 4 == 3 else 0 for j in range(10)] for i in range(15)]

# Search
for value in values:
    b, f, r, v = map(int, value)
    a[4 * b + f - 5][r - 1] = v

# Output
for i in range(15):
    row_output = ""
    for j in range(10):
        if i > 0 and i % 4 == 3:
            row_output += "##"
        else:
            row_output += " " + str(a[i][j])
    print(row_output)

Submission status: Wrong Answer

Solution code:
array = [[10*[0] for _ in [0]*3] for _ in [0]*4]
n = int(input())
for _ in range(n):
    a,b,c,d = map(int,input().split())
    array[a-1][b-1][c-1] = d
for i in range(4):
    for j in range(3): print('',*array[i][j])
    if i<3: print('#'*20)

Submission status: Wrong Answer

Solution code:
a = [[[0] * 10 for i in range(3)] for j in range(4)]

n = int(input())

for _ in range(n):
    [b, f, r, v] = [int(j) - 1 for j in input().split()]
    a[b][f][r] = v + 1

for i, d in enumerate(a):
    for c in d: print("", *c)
    if i != len(a) - 1:
        print("#" * 20)

Submission status: Wrong Answer

Solution code:
a = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())

for _ in range(n):
    [b, f, r, v] = [int(j) - 1 for j in input().split()]
    a[b][f][r] = v + 1

for i, d in enumerate(a):
    for c in d: print("", *c)
    if i != len(a) - 1:
        print("#" * 20)

Submission status: Wrong Answer

Solution code:
_1_1=[]
_1_2=[]
_1_3=[]
_2_1=[]
_2_2=[]
_2_3=[]
_3_1=[]
_3_2=[]
_3_3=[]
for i in range(10):
    _1_1.append(0)
    _1_2.append(0)
    _1_3.append(0)
    _2_1.append(0)
    _2_2.append(0)
    _2_3.append(0)
    _3_1.append(0)
    _3_2.append(0)
    _3_3.append(0)
N=int(input())
s=[input() for i in range(N)]
bfrv=[]
for i in s:
    bfrv.append(i.split())
for i in bfrv:
    if i[0]==1 and i[1]==1:
        _1_1[int(i[2])-1]+=int(i[3])
    if i[0]==1 and i[1]==2:
        _1_2[int(i[2])-1]+=int(i[3])
    if i[0]==1 and i[1]==3:
        _1_3[int(i[2])-1]+=int(i[3])
    if i[0]==2 and i[1]==1:
        _2_1[int(i[2])-1]+=int(i[3])
    if i[0]==2 and i[1]==2:
        _2_2[int(i[2])-1]+=int(i[3])
    if i[0]==2 and i[1]==3:
        _2_3[int(i[2])-1]+=int(i[3])
    if i[0]==3 and i[1]==1:
        _3_1[int(i[2])-1]+=int(i[3])
    if i[0]==3 and i[1]==2:
        _3_2[int(i[2])-1]+=int(i[3])
    if i[0]==3 and i[1]==3:
        _3_3[int(i[2])-1]+=int(i[3])
print(*_1_1)
print(*_1_2)
print(*_1_3)
print("#"*20)
print(*_2_1)
print(*_2_2)
print(*_2_3)
print("#"*20)
print(*_3_1)
print(*_3_2)
print(*_3_3)

Submission status: Wrong Answer

Solution code:
A = []
for _ in range(4):
        floor = []
        for _ in range(3):
                room = []
                for _ in range(10):
                        room.append(0)
                floor.append(room)
        A.append(floor)

n = int(input())

for _ in range(n):
        b, f, r, v = map(int, input().split())
        A[b-1][f-1][r-1] += v

for b in A:
        for f in b:
                f = list(map(str, f))
                print(' '.join(f))
        print('#'*20)

Submission status: Wrong Answer

Solution code:
A = []
for _ in range(12):
        A.append([0]*10)

n = int(input())
for _ in range(n):
        b, f, r, v = map(int, input().split())
        A[3*b-(3-f)-1][r-1] += v

for i in range(12):
        
        if i in [2, 5, 8]:
                print('#'*20)
        else:
                print(' ', end='')
                print(' '.join(map(str, A[i])))

Submission status: Wrong Answer

Solution code:
sharpNum = 20
roomNum = 10
height = 15
dataNum = int(input())
#building = [[0]*sharpNum] * height
building = [[0] * sharpNum for i in range(height)]
actRoom = 0
for data in range(dataNum):
    b,f,r,v = map(int, input().split())
    for floor in range(height):
        if floor%4 == 3:
            for room in range(sharpNum):
                #print("#floor: %d" %floor)
                #print("#room: %d" %room)
                building[floor][room] = "#"
                #print("buiding: &s" %building[floor][room])
        else:
            for room in range(sharpNum):
                if room%2 == 0:
                    building[floor][room] = " "
                else:
                    actRoom = actRoom + 1
                    #print("#room: %d" %room)
                    #print("#actRoom: %d" %actRoom)
                    if floor == f-1 and actRoom == r:
                        building[floor][room] = building[floor][room] + v

for floor in range(height):      
    for i in range(len(building[0])):
        print(building[floor][i],end="")

Submission status: Wrong Answer

Solution code:
sharpNum = 20
roomNum = 10
height = 15
dataNum = int(input())
#building = [[0]*sharpNum] * height
building = [[0] * sharpNum for i in range(height)]

for data in range(dataNum):
    actBuilding = 1
    actRoom = 0
    actFloor = 0
    b,f,r,v = map(int, input().split())
    for floor in range(height):
        actRoom = 0
        if floor%4 == 3:
            actFloor = 0
            actBuilding = actBuilding + 1
            for room in range(sharpNum):
                building[floor][room] = "#"
        else:
            actFloor = actFloor + 1
            
            for room in range(sharpNum):
                if room%2 == 0:
                    building[floor][room] = " "
                else:
                    actRoom = actRoom + 1 #f = 2, floor = 13, 13-3*3=4
                    #print("actFloor: %d" %actFloor)
                    #print("actRoom: %d" %actRoom)
                    if actBuilding == b and actFloor== f and actRoom == r:
                        print("actRoom: %d" %actRoom)
                        building[floor][room] = building[floor][room] + v

for floor in range(height):      
    for i in range(len(building[0])):
        print(building[floor][i],end="")
    print("")

Submission status: Wrong Answer

Solution code:
n = int(input())
li = ["#"*20 if i%4==0 else "0"*10 for i in range(1, 16)]
for _ in range(n):
    b, f, r, v = map(int, input().split())
    h = 4*b-(4-f)-1
    v = v if v > 0 else v == 0
    li[h] = li[h].replace(li[h], ''.join([str(v) if i == r-1 else list(li[h])[i] for i in range(10)]))
li = [' '+' '.join(li[i]) if (i+1)%4!=0 else li[i] for i in range(len(li))]
print('\n'.join(li))

Submission status: Wrong Answer

Solution code:
count = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())
for i in range(n):
    b, f, r, v = map(int, input().split())
    
    count[b-1][f-1][r-1] = v
 #   for y in range(4):

x = 0
for i in range(4):
    if x != 0:
        print("#"*20)
    x += 1
 
    for a in range(3):
        for b in range(10):
            print(" %d"%(count[i][a][b]),end = "")
        print()

Submission status: Wrong Answer

Solution code:
room=[[[0 for i in range(10)]for j in range(3)]for k in range(4)]

for i in range(int(input())):
	n=list(map(int,input().split()))
	room[n[0]-1][n[1]-1][n[2]-1]=n[3]
n=0
for i in room:
	for j in i:
		print(' '+' '.join(list(map(str,j))))
		if n==2 or n==5or n==8:
			print('####################')
		n+=1

Submission status: Wrong Answer

Solution code:
rooms = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
n = int(input())
for l in range(n):
    a,b,c,d = map(int, input().split())
    rooms[a-1][b-1][c-1] += d
for i in range(4):
    for j in range(3):
        for k in range(10):
            print(rooms[i][j][k], end = "")
            if k != 9:
                print(" ", end="")
        print()
    print("####################")

Submission status: Wrong Answer

Solution code:
n=int(input())
tou=[[[0 for i in range(10)] for j in range(3)] for k in range(4)]
print(len(tou))
for _ in range(n):
    b,f,r,v=map(int, input().split())
    tou[b-1][f-1][r-1]+=v

for i in range(4): # 棟
    for j in range(3): # 階
        print(*tou[i][j])
    if i!=3: print('#'*20)

Submission status: Wrong Answer

Solution code:
n = int(input())
home = [[0 for i in range(20)] for j in range(15)]  #横最大20→間の#,縦最大3階*4棟+3行の空行
for i in range(n) :
  b, f, r, v = map(int, input().split())
  h = (b - 1) * 4 + f - 1
  w = r * 2 - 1
  s = v
  home[h][w] += s
for y in range(15) :
  for x in range(20) :
    if(y % 4 == 3) :
      home[y][x] = "#"
    elif(x % 2 == 0) :
      home[y][x] == " "
    print(home[y][x], end = "")
  print()

Submission status: Wrong Answer

Solution code:
table = [[[ 0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())

i = 0
while i < n:
    b,f,r,v = (int(x) for x in input().split())
    
    table[b-1][f-1][r-1] += v

    i += 1

for i,elem_i in enumerate(table):    # building
    for j,elem_j in enumerate(elem_i): # floor
        for k, elem_k in enumerate(elem_j): # room
            if k != 0:
                print (' ', end='')
            print (str(elem_k), end='')
        print ("")
    if i != 3:
        print ("###################")

Submission status: Wrong Answer

Solution code:
table = [[[ 0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())

i = 0
while i < n:
    b,f,r,v = (int(x) for x in input().split())
    
    table[b-1][f-1][r-1] += v

    i += 1

for i,elem_i in enumerate(table):           # building
    for j,elem_j in enumerate(elem_i):      # floor
        for k, elem_k in enumerate(elem_j): # room
            print (str(elem_k), end='')
        print ("")
    if i != 3:
        print ("###################")

Submission status: Wrong Answer

Solution code:
table = [[[ 0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())

i = 0
while i < n:
    b,f,r,v = (int(x) for x in input().split())
    
    table[b-1][f-1][r-1] += v

    i += 1

for i,elem_i in enumerate(table):           # building
    for j,elem_j in enumerate(elem_i):      # floor
        for k, elem_k in enumerate(elem_j): # room
            print (" " + str(elem_k), end='')
        print ("")
    if i != 3:
        print ("###################")

Submission status: Wrong Answer

Solution code:
table = [0] * 4*3*10

n = int(input())

for i in range(n):
    b,f,r,v = map(int, input().split())
    table[30*(b-1)+10*(f-1)+(r-1)] += v

for i in range(120):
    if i % 30:
        print("####################")
    print(table[i], end="")
    if i%10 ==9:
        print()
    else:
        print(" ", end="")

Submission status: Wrong Answer

Solution code:
table = [0] * 4*3*10

n = int(input())

for i in range(n):
    b,f,r,v = map(int, input().split())
    table[30*(b-1)+10*(f-1)+(r-1)] += v

for i in range(120):
    if i % 30:
        print("####################")
    print(table[i], end="")
    if i%10 == 9:
        print()
    else:
        print(" ", end="")

Submission status: Wrong Answer

Solution code:
table = [0] * 4*3*10

n = int(input())

for i in range(n):
    b,f,r,v = map(int, input().split())
    table[30*(b-1)+10*(f-1)+(r-1)] += v

for i in range(120):
    if i % 30 == 0:
        print("####################")
    print(table[i], end="")
    if i%10 == 9:
        print()
    else:
        print(" ", end="")

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []

a = [[[0]*10 for _ in range(3)] for _ in range(4)]

for i in range(n):
    b, f, r, v = map(int, input().split())
    a[b-1][f-1][r-1] += v

for i in range(4):
    for j in range(3):
        print(*a[i][j])
    print('#'*20)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = []

a = [[[0]*10 for _ in range(3)] for _ in range(4)]

for i in range(n):
    b, f, r, v = map(int, input().split())
    a[b-1][f-1][r-1] += v

for i in range(4):
    for j in range(3):
        print('',*a[i][j])
    print('#'*20)

Submission status: Wrong Answer

Solution code:
num = int(input())

list2 = [[[0 for _ in range(10)] for _ in range(3)] for _ in range(4)]

for i in range(num):
	#b棟 f階 r番目 v人
	b,f,r,v = map(int,input().split(" "))
	list2[b-1][f-1][r-1] = v

for i in range(4):
	for j in range(3):
		print(" ",end="")
		print(*list2[i][j])
	print("####################")

Submission status: Wrong Answer

Solution code:
num = int(input())

list2 = [[[0 for _ in range(10)] for _ in range(3)] for _ in range(4)]

for i in range(num):
	#b棟 f階 r番目 v人
	b,f,r,v = map(int,input().split(" "))
	list2[b-1][f-1][r-1] += v

for i in range(4):
	for j in range(3):
		print(" ",end="")
		print(*list2[i][j])
	print("####################")

Submission status: Wrong Answer

Solution code:
n = int(input())
A = [[0]*10 for i in range(12)] 

for _ in range(n):
    b, f, r, v = map(int, input().split())
    A[(b-1)*3 + (f-1)][r-1] = v
for i, v in enumerate(A, 1):
    print(' '.join([str(p) for p in v]))
    if i % 3 == 0:
        print('####################')

Submission status: Wrong Answer

Solution code:
n = int(input())
A = [[0]*10 for i in range(12)] 

for _ in range(n):
    b, f, r, v = map(int, input().split())
    A[(b-1)*3 + (f-1)][r-1] = v
for i, v in enumerate(A, 1):
    print(' '.join([str(p) for p in v]))
    if (i % 3 == 0) and (i != n):
        print('####################')

Submission status: Wrong Answer

Solution code:
n = int(input())
A = [[0]*10 for i in range(12)] 

for _ in range(n):
    b, f, r, v = map(int, input().split())
    A[(b-1)*3 + (f-1)][r-1] = v
for i, v in enumerate(A, 1):
    print(' ' + ' '.join([str(p) for p in v]))
    if i == 3 or i == 6 or i == 9:
        print('####################')

Submission status: Wrong Answer

Solution code:

buildings =  [[[0 for r in range(10)] for f in range(3)] for b in range(4)]
n = int(input())
for _ in range(n):
    b, f, r, v = map(int, input().split())

    buildings[b-1][f-1][r-1] += v

for b in buildings:
    for f in b:
        print(" ",end="")
        print(*f)
    print("#" * 20)

Submission status: Wrong Answer

Solution code:
count = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())


b_list=[]
f_list=[]
r_list=[]
v_list=[]
while n > 0:
  b, f, r, v = map(int, input().split())
  b_list.append(b)
  f_list.append(f)
  r_list.append(r)
  v_list.append(v)
  n = n-1

for (blist,flist,rlist,vlist) in zip(b_list,f_list,r_list,v_list):
  count[blist-1][flist-1][rlist-1] = count[blist-1][flist-1][rlist-1] + vlist

for i in range(0, 4):
  for j in range(0, 3):
    for k in range(0, 10):
      print("",count[i][j][k],end="")
    print()
  print("####################")

Submission status: Wrong Answer

Solution code:
count = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

n = int(input())


b_list=[]
f_list=[]
r_list=[]
v_list=[]
while n > 0:
  b, f, r, v = map(int, input().split())
  b_list.append(b)
  f_list.append(f)
  r_list.append(r)
  v_list.append(v)
  n = n-1

for (blist,flist,rlist,vlist) in zip(b_list,f_list,r_list,v_list):
  count[blist-1][flist-1][rlist-1] = count[blist-1][flist-1][rlist-1] + vlist

for i in range(0, 4):
  for j in range(0, 3):
    for k in range(0, 10):
      print("",count[i][j][k],end="")
    print()
  if i != 4:
    print("####################")

Submission status: Wrong Answer

Solution code:
count =[[[0 for i in range(10)] for j in range(3)] for k in range(4)]
n = int(input())
for x in range(n):
    b,f,r,v = map(int,input().split())
    # 1 <= b <=4
    # 1 <= f <= 3
    # 1 <= r <= 10
    # 1 <= v <= 9
    count[b-1][f-1][r-1] = v
    
for i in range(4):
    for j in range(3):
        for k in range(10):
            print(f' {count[i][j][k]}',end="")
        print()
    if int(i) < 3:
        print("#"*20)

Submission status: Wrong Answer

Solution code:
def az17():
    a = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
    n = input()
    for i in range(n):
        xs = map(int,raw_input().split())
        a[xs[0]-1][xs[1]-1][xs[2]-1] = a[xs[0]-1][xs[1]-1][xs[2]-1] + xs[3]
    for b in range(0,4):
        for f in range(0,3):
            for r in range(0,10):
                print a[b][f][r],
            print
        print "#"*20
    
    
az17()

Submission status: Wrong Answer

Solution code:
def az17():
    a = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]
    n = input()
    for i in range(n):
        xs = map(int,raw_input().split())
        a[xs[0]-1][xs[1]-1][xs[2]-1] = a[xs[0]-1][xs[1]-1][xs[2]-1] + xs[3]
    for b in range(0,4):
        for f in range(0,3):
            print "",
            for r in range(0,10):
                print a[b][f][r],
            print
        print "#"*20
    
    
az17()

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
room = [int(0) for i in range(4) for j in range(3) for k in range(10)]
while count < n:
    x = list(map(lambda k: int(k), input().split(" ")))
    room[(x[0]-1)*30+(x[1]-1)*10+(x[2]-1)] += x[3]
    count += 1
for i in range(4):
    for j in range(3):
        for k in range(10):
            if k == 0:
                print("%d" % room[30*i+10*j+k], end="")
            else:
                print(" %d" % room[30*i+10*j+k], end="")
        print("")
    print("####################")

Submission status: Wrong Answer

Solution code:
n = input()
floor = []
for i in range(n):
    floor.append(map(int,raw_input().split()))

bill = [ [ [ 0 for c in range(10)] for b in range(3)] for a in range(4)]

for a in floor:
    bill[a[0]-1][a[1]-1][a[2]-1] = a[3]

for a in bill:
    print "####################"
    for b in a:
        print " " + " ".join(map(str,b))

Submission status: Wrong Answer

Solution code:
n = input()
floor = []
for i in range(n):
    floor.append(map(int,raw_input().split()))

bill = [ [ [ 0 for c in range(10)] for b in range(3)] for a in range(4)]

for a in floor:
    bill[a[0]-1][a[1]-1][a[2]-1] = a[3]
flg = 0
for a in bill:
    if flg == 1:
        print "####################"
    for b in a:
        print " " + " ".join(map(str,b))
        flg = 1

Submission status: Wrong Answer

Solution code:
import sys
n = int(raw_input())
array = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for x in range(0, n):
	b, f, r, v = map(int, raw_input().split())
	array[b - 1][f - 1][r - 1] = v

for i in range(0, 4):
	for j in range(0, 3):
		for k in range(0, 10):
			print array[i][j][k],
		print ""
	sys.stdout.write("#"*20)
	print ""

Submission status: Wrong Answer

Solution code:
import sys
n = int(raw_input())
array = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for x in range(0, n):
	b, f, r, v = map(int, raw_input().split())
	array[b - 1][f - 1][r - 1] += v
print ""
for i in range(0, 4):
	for j in range(0, 3):
		for k in range(0, 10):
			print array[i][j][k],
		print ""
	sys.stdout.write("#"*20)
	print ""

Submission status: Wrong Answer

Solution code:
import sys
n = int(raw_input())
array = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for x in range(0, n):
	b, f, r, v = map(int, raw_input().split())
	array[b - 1][f - 1][r - 1] += v
print ""
for i in range(0, 4):
	for j in range(0, 3):
		print " ",
		for k in range(0, 10):
			print array[i][j][k],
		print ""
	sys.stdout.write(" " + "#"*20)
	print ""

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

nums = [[[0 for x in range(10)] for x in range(3)] for x in range(4)]

for idx in range(n):

    b, f, r, v  = tuple([int(x) for x in raw_input().split(" ")])
    print "%d %d %d %d" % (b, f, r, v)
    nums[b-1][f-1][r-1] += v

for i_b in range(b):
    if i_b != 0: print "#"*20
    for i_f in range(f):
        print " ".join([str(x) for x in nums[i_b][i_f]])

Submission status: Wrong Answer

Solution code:

n = int(raw_input())

nums = [[[0 for x in range(10)] for x in range(3)] for x in range(4)]

for idx in range(n):

    b, f, r, v  = tuple([int(x) for x in raw_input().split(" ")])
    nums[b-1][f-1][r-1] += v

for i_b in range(b):
    if i_b != 0: print "#"*20
    for i_f in range(f):
        print " " + " ".join([str(x) for x in nums[i_b][i_f]])

Submission status: Wrong Answer

Solution code:
floor = [
        [[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],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]

count = int(input())
for c in range(count):
    (t,f,r,i) = [int(x) for x in input().split()]
    floor[t-1][f-1][r-1] = i

for z in range(4):
    for i in range(len(floor[z])):
        for v in floor[z][i]:
            print(v, end=' ')
        print()
    for h in range(20):
        print('#', end='')
    print()

Submission status: Wrong Answer

Solution code:
floor = [
        [[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],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]

count = int(input())
for c in range(count):
    (t,f,r,i) = [int(x) for x in input().split()]
    floor[t-1][f-1][r-1] = i

for z in range(4):
    for i in range(len(floor[z])):
        print(end=' ')
        for v in floor[z][i]:
            print(v, end=' ')
        print()
    for h in range(20):
        print('#', end='')
    print()

Submission status: Wrong Answer

Solution code:
floor = [
        [[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],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]

count = int(input())
for c in range(count):
    (t,f,r,i) = [int(x) for x in input().split()]
    floor[t-1][f-1][r-1] = i

for z in range(4):
    for i in range(len(floor[z])):
        print(end=' ')
        for v in floor[z][i]:
            print(v, end=' ')
        print()
        if not z == 3:
            for h in range(20):
                print('#', end='')
    print()

Submission status: Wrong Answer

Solution code:
data = [
        [[0 for k in range(10)] for j in range(3)] for i in range(4)
        ]

count = int(input())

for x in range(count):
   (b,f,r,v) = [int(i) for i in input().split()]
   data[b - 1][f - 1][r - 1] += v

for b in range(4):
    for f in range(3):
        for r in range(10):
            if r == 10:
                print(data[b][f][r], end='')
            else:
                print(data[b][f][r], '', end='')
        print()

    if b == count:
        break
    for x in range(19):
        print('#',end='')
    print()