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 kazuki.h
from itertools import product
def checkio(landing_map):
result = 0
for i, j in product(range(len(landing_map)), range(len(landing_map[0]))):
for n, m in product(range(i+1), range(j+1)):
if (i-n+1)*(j-m+1) > result and all([landing_map[a][b] in ["G", "S"] for a, b in product(range(n, i+1), range(m, j+1))]):
result = (i-n+1)*(j-m+1)
return result
Dec. 18, 2021
Comments: