Created
January 10, 2016 04:13
-
-
Save whatalnk/d87ae995c23ced31e57c to your computer and use it in GitHub Desktop.
TopCoder SRM #665 Div2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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