Skip to content

Instantly share code, notes, and snippets.

@smohammadhn
Last active February 13, 2019 14:01
Show Gist options
  • Save smohammadhn/d8710936da66dde4dc2246bbf751559c to your computer and use it in GitHub Desktop.
Save smohammadhn/d8710936da66dde4dc2246bbf751559c to your computer and use it in GitHub Desktop.
Train
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])
@smohammadhn
Copy link
Author

still 6 wrong answers

@smohammadhn
Copy link
Author

smohammadhn commented Feb 12, 2019

UPDATE!

alright, now we're down to only 3 wrong answers!

@smohammadhn
Copy link
Author

finallyyyyyyyyyyyyyyyyyyyy ... yeah

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment