master^2
nwerc-082 2016-11-20 11:33:56 +00:00
parent 1b9d9346a1
commit 0231d45937
1 changed files with 12 additions and 0 deletions

12
H.py Normal file
View File

@ -0,0 +1,12 @@
from __future__ import print_function
import sys
def to_int(x):
bs = []
for b in x:
if bs and bs[-1]:
bs.append(0 if b == "1" else 1)
else:
bs.append(1 if b == "1" else 0)
return int("".join(map(str, bs)), 2)
n, a, b = sys.stdin.readline().split(); n = int(n)
print(to_int(b) - to_int(a) - 1)