Created
March 9, 2020 03:47
-
-
Save c-yan/c9bd5173edd8c02c340bfc058d7ea032 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
L = int(input(), 2) | |
result = 0 | |
for a in range(L + 1): | |
for b in range(L + 1): | |
if a + b > L: | |
continue | |
if a + b != a ^ b: | |
continue | |
result += 1 | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment