We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
def solve(steps):
# Write your code here
first = True
for i in steps:
if first:
minrow = i[0]
mincol = i[1]
first = False
else:
if i[0] < minrow:
minrow = i[0]
if i[1] < mincol:
mincol = i[1]
return (minrow * mincol)
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Rectangular Game
You are viewing a single comment's thread. Return to all comments →
def solve(steps): # Write your code here first = True for i in steps: if first: minrow = i[0] mincol = i[1] first = False else: if i[0] < minrow: minrow = i[0] if i[1] < mincol: mincol = i[1] return (minrow * mincol)