Buggy python submission (verdict: Runtime Error):
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

def conv(c):
	return int(c=='#')
H, W, K = map(int, input().split())
a = np.array([map(conv, input().split()) for _ in range(H)])

count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	for i in range(2 ** W - 1):
		c = np.delete(b.copy(), [j for j in range(H) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)
print()

Fixed submission:
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

def conv(c):
	#print(c)
	return int(c=='#')
H, W, K = map(int, input().split())
a = np.array([list(map(conv, input())) for _ in range(H)])
count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	blen = b.shape[1]
	for i in range(2 ** W - 1):
		c = np.delete(b, [j for j in range(blen) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)
print()

Buggy python submission (verdict: Runtime Error):
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

H, W, K = map(int, input().split())
a = np.array([map(int, input().split()) for _ in range(H)])

count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	for i in range(2 ** W - 1):
		c = np.delete(b.copy(), [j for j in range(H) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)
print()

Fixed submission:
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

def conv(c):
	#print(c)
	return int(c=='#')
H, W, K = map(int, input().split())
a = np.array([list(map(conv, input())) for _ in range(H)])
count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	blen = b.shape[1]
	for i in range(2 ** W - 1):
		c = np.delete(b, [j for j in range(blen) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)
print()

Buggy python submission (verdict: Runtime Error):
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

H, W, K = map(int, input().split())
a = np.array([map(int, input().split()) for _ in range(H)])

count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	for i in range(2 ** W - 1):
		c = np.delete(b.copy(), [j for j in range(H) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)


Fixed submission:
import numpy as np
'''
K = 2
H, W = 5, 5
a = np.array([
	[0, 0, 0, 0, 1],
	[0, 0, 0, 1, 1],
	[0, 0, 1, 1, 1],
	[0, 1, 1, 1, 1],
	[1, 1, 1, 1, 1]
])
'''

def conv(c):
	#print(c)
	return int(c=='#')
H, W, K = map(int, input().split())
a = np.array([list(map(conv, input())) for _ in range(H)])
count = 0
for i in range(2 ** H - 1):
	b = np.delete(a.copy(), [j for j in range(H) if ((i >> j) & 1)], 0)
	blen = b.shape[1]
	for i in range(2 ** W - 1):
		c = np.delete(b, [j for j in range(blen) if ((i >> j) & 1)], 1)
		#print(np.sum(c))
		if K==np.sum(c):
			count += 1
print(count)
print()