Skip to content

Instantly share code, notes, and snippets.

@makefunstuff
Created August 10, 2014 21:14
Show Gist options
  • Save makefunstuff/a63324d3faa07360ed52 to your computer and use it in GitHub Desktop.
Save makefunstuff/a63324d3faa07360ed52 to your computer and use it in GitHub Desktop.
Finally
from re import findall
array = [10, 2, 14, 7, 8, 12, 15, 11, 0, 4, 1, 13, 3, 9, 6]
def phase_5():
a, b = map(lambda x: int(x), findall("\d+", raw_input()))
a &= 0xf
if a != 0xf:
c, d = 0, 0
while True:
d += 1
a = array[a]
c += a
if a == 0xf:
break
if d == 15 or c == b:
return
print "BOOM"
if __name__ == '__main__':
phase_5()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment