Last active
February 13, 2019 14:01
-
-
Save smohammadhn/d8710936da66dde4dc2246bbf751559c to your computer and use it in GitHub Desktop.
Train
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
def change(string): | |
arr = "" | |
for char in string: | |
if char == "0": | |
arr += "1" | |
else: | |
arr += "0" | |
return arr | |
l, r = map(int, input().split()) | |
my_string = "1" | |
for i in range(r): | |
my_string += change(my_string) | |
print(my_string[l - 1:r]) |
finallyyyyyyyyyyyyyyyyyyyy ... yeah
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UPDATE!
alright, now we're down to only 3 wrong answers!