Buggy python submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))

proba = 0
for i in range(1, N+1):
  x = i
  p = 1
  while x < K:
    p *= 0.5
    x *= 2
  proba += p/N
print(proba)


Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))

proba = 0.0

for i in range(1, N+1):
  x = i
  p = 1.0
  while x < K:
    p *= 0.5
    x += 1
  proba += p/N
  
print(proba)

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))

proba = 0
for i in range(1, N+1):
  x = i
  p = 1
  while x < K:
    p *= 0.5
    x += 1
  proba += p/N
  


Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))

proba = 0
for i in range(1, N):
  x = i
  p = 1
  while x < K:
    p *= 0.5
    x += 1
  proba += p/N
  
print(proba)

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
n, k = list(map(int, input().split()))

proba = 0
for i in range(1, N):
  x = i
  p = 1
  while x < K:
    p *= 0.5
    x += 1
  proba += p/N
  

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
import math

s = input().split()
n = s[0]
k = s[1]

proba = 0

for i in range(1, k):
  n_coin = int(math.log(k/i,2)) + 1
  print(i, n_coin)
  proba += float(1)/n*((0.5)**n_coin)

if n >= k:
	proba += float(n-k+1)/n
print(proba)

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
import math

s = input().split()
n = s[0]
k = s[1]

proba = 0

for i in range(1, k):
  n_coin = int(math.log(k/i,2)) + 1
  print(i, n_coin)
  proba += float(1)/n*((0.5)**n_coin)

if n >= k:
	proba += float(n-k+1)/n

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)

Buggy python submission (verdict: Runtime Error):
import math

inp = input().split()
n = inp[0]
k = inp[1]
proba = 0

for i in range(1, k):
  n_coin = int(math.log(k/i,2)) + 1
  print(i, n_coin)
  proba += float(1)/n*((0.5)**n_coin)

if n >= k:
	proba += float(n-k+1)/n

Fixed submission:
N, K = list(map(int, input().split()))
 
ans = 0
for i in range(1, N+1):
    p = 1
    x = i
    while x < K:
        p *= 0.5
        x *= 2
    
    ans += p/N
 
print(ans)