Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Spaceship Landing Strip by Tinus_Trotyl
def checkio(landing_map):
n = [[0 if landing_map[y][x] in 'GS' else 1 \
for x in range(len(landing_map[0]))] \
for y in range(len(landing_map))]
a = 0
for y0 in range(len(n)):
for y1 in range(y0, len(n)):
for x0 in range(len(n[0])):
for x1 in range(x0, len(n[0])):
if not sum([n[y][x] for x in range(x0, x1+1) for y in range(y0, y1+1)]):
a = max(a, (x1 - x0 + 1) * (y1 - y0 + 1))
return a
Feb. 22, 2019
Comments: