Skip to content

Instantly share code, notes, and snippets.

@whatalnk
Created January 10, 2016 04:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save whatalnk/d87ae995c23ced31e57c to your computer and use it in GitHub Desktop.
Save whatalnk/d87ae995c23ced31e57c to your computer and use it in GitHub Desktop.
TopCoder SRM #665 Div2
class LuckyXor():
def construct(self, a):
for i in range(a+1, 101):
tmp = a ^ i
if tmp in [4, 44, 7, 77]:
return i
break
if i == 100:
return -1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment