Browse Source

...

master^2
nwerc-082 5 years ago
parent
commit
0231d45937
  1. 12
      H.py

12
H.py

@ -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)
Loading…
Cancel
Save