Browse Source

...

master^2
nwerc-082 3 years ago
parent
commit
0231d45937
1 changed files with 12 additions and 0 deletions
  1. 12
    0
      H.py

+ 12
- 0
H.py 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)

Loading…
Cancel
Save