Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
TopCoder SRM #678 Div2
class ThePhantomMenace:
def find(self, doors, droids):
if type(doors) == int:
doors = [doors]
doors = list(doors)
if type(droids) == int:
droids = [droids]
droids = list(droids)
res = 0
for d in doors:
safety = min([abs(d - i) for i in droids])
res = max([res, safety])
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.