restructure zeta/** to storage/zeta/**

This commit is contained in:
2025-05-10 21:54:24 +09:00
parent 2886820691
commit 2f2e0759fd
407 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,17 @@
def S(n: int):
s = n & 1
for i in range(60 - 1, 0, -1):
if n & (1 << i):
s += S.points[i - 1] + (n - (1 << i) + 1)
n -= 1 << i
return s
S.points = [0] * 60
S.points[0] = 1
for i in range(1, 60):
S.points[i] = 2 * S.points[i - 1] + (1 << i)
if __name__ == "__main__":
A, B = map(int, input().split())
print(S(B) - S(A - 1))