Harryxun/stf_run huggingface dataset:
n = int(input())
b = list(map(int,input().split()))

#b = list(set(a))
b.sort()
print(b)
 
if len(b) > 1:
    l = len(b)//2
    print(b[l])
else:
    print(b[0])
        

### FIXED CODE ###

n,k = map(int,input().split())
x = list(map(int,input().split()))

x.append(0)
x.sort()

#print(x)

min = 10**10

zeroIdx = x.index(0)

for i in range(zeroIdx-k,zeroIdx+1):
    if i < 0 : 
        continue
    elif len(x) <= i + k :
        break

    plsIdx = i + k 
    misIdx = i

    #print(misIdx,plsIdx,x[misIdx],x[plsIdx])

    if abs(x[plsIdx]) > abs(x[misIdx]) :
        tmp = abs(x[plsIdx]) + (abs(x[misIdx])<<1)
    else:
        tmp = (abs(x[plsIdx])<<1) + abs(x[misIdx])

    if tmp < min :
        min = tmp

print(min)
x = input()
k = int(x[0,0])
a = int(x[1, 0])
b = int(x[1, 1])
if k <= b - a:
  print('OK')
else:
  if b % k <= a % k:
    print('OK')
  else:
    print('NG')

### FIXED CODE ###

k = int(input())
a,b = map(int,input().split())
if k <= b - a:
  print('OK')
else:
  if b // k > a // k or a % k == 0:
    print('OK')
  else:

    print('NG')
import math

A,B,H,M = map(int, input().split())
##Aは短針の長さ、Bは長針の長さ
##ARは短針の進んだ針の角度、BRは長針の進んだ針の角度
AR = 360*H/12+30*M/60
BR = 360*M/60

if abs(AR-BR)<180:
  X = abs(AR-BR)
elif abs(AR-BR)>180:
  X = 360-abs(AR-BR)
else :
  X = 0

C = math.sqrt(　A**2+B**2-abs(2*A*B*math.cos(math.radians(X)))　)

if X ==0:
  print(A+B)
else:
  print(C)


### FIXED CODE ###

import math

A,B,H,M = map(int,input().split())

a = 360 * (H/12 + 1/12*M/60)
b = 360 * M/60

c = abs(a-b)
c = min(c,360-c)
cos = math.cos(math.radians(c))

hypotenuse = math.sqrt(math.pow(A, 2) + math.pow(B, 2) - 2 *A*B*cos)

print(hypotenuse)
n = int(input())
#mont = [int(input()) for i in range(n)]
mont = list(map(int,input().split()))
conut = 0
for i in range(n):
  if mont[i] >= max(mont[:i]):
    count += 1
print(count)


### FIXED CODE ###

n = int(input())
#mont = [int(input()) for i in range(n)]
mont = list(map(int,input().split()))
count = 0
for i in range(n):
  if mont[i] >= max(mont[:i+1]):
    count += 1
print(count)
N, Q = map(int, input().split())
S = input()
t = [0] * (N+1)
ans = []

for i in range(N):
    t[i+1] += t[i] + ( 1 if S[i:i+2] == 'AC' else 0) 

for i in range(Q):
    l, r = map(int, input().split())
    ans = ans.append(t[r-1] - t[l-1])
    
for i in range(Q):
    print(ans[i])



### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
t = [0] * (N+1)
ans = []

for i in range(N):
    t[i+1] += t[i] + ( 1 if S[i:i+2] == 'AC' else 0) 

for i in range(Q):
    l, r = map(int, input().split())
    ans.append(t[r-1] - t[l-1])
    
for i in range(Q):
    print(ans[i])
data = list(map(int,input.split()))
print data[0] * data[1]

### FIXED CODE ###

[a, b] = map(int,input().split())

print("{} {}".format(a * b , (a + b) * 2))
W, H, N = [int(x) for x in input().strip().split()]
x_min = 0
y_min = 0

for i in range(N):
    x, y, a = [int(x) for x in input().strip().split()]
    if a == 1 and x_min < x:
        x_min = x
    elif a == 2 and W > x:
        W = x
    elif a == 3 and y_min < y:
        y_min = y
    elif a == 4 and H > y:
        H = y
    
if x_min > w or y_min > H:
    print('0')
else:
    print('(W - x_min)*(H - y_min)')

### FIXED CODE ###

W, H, N = [int(x) for x in input().strip().split()]
x_min = 0
y_min = 0

for i in range(N):
    x, y, a = [int(x) for x in input().strip().split()]
    if a == 1 and x_min < x:
        x_min = x
    elif a == 2 and W > x:
        W = x
    elif a == 3 and y_min < y:
        y_min = y
    elif a == 4 and H > y:
        H = y
    
if x_min > W or y_min > H:
    print('0')
else:
    print((W - x_min)*(H - y_min))
L = input();
print((L/3)^3)

### FIXED CODE ###

l = input();
l = int(l);
print((l/3)**3)
from itertools import permutations
n = int(input())
p = list(map(int,input().split()))
q = list(map(int,input().split()))
res = list(permutations(range(1,n+1)))
ans = abs(res.index(p) - res.index(q))
print(ans)

### FIXED CODE ###

from itertools import permutations
 
n = int(input())
p = tuple(map(int, input().split()))
q = tuple(map(int, input().split()))
a = list(permutations(range(1, n + 1)))
print(abs(a.index(p) - a.index(q)))
s=input()
t=input()

li=[]
for i in range(len(s)-len(t)+1):
    if s[i]==t[0] or s[i]=='?':
        check=1
        tid=1
        while True:
            if s[i+1] ==t[tid] or s[i+1]=='?':

                check+=1
                i+=1
                tid+=1

                if check==len(t):
                    li.append(s[:i-len(t)+1]+t+s[i+1:])
                    break
            else:
                break

li2=[]      
print(li)
for i in li:

    li2.append(i.replace('?','a'))
    

li2.sort()


print(li2[0] if li2 else 'UNRESTORABLE')

### FIXED CODE ###

s=input()
t=input()

li=[]
for i in range(len(s)-len(t)+1):
    if s[i]==t[0] or s[i]=='?':
        check=1
        tid=1
        if len(t)==1:
            li.append(s[:i-len(t)+1]+t+s[i+1:])
        else:

            while True:
                if s[i+1] ==t[tid] or s[i+1]=='?':

                    check+=1
                    i+=1
                    tid+=1

                    if check==len(t):
                        li.append(s[:i-len(t)+1]+t+s[i+1:])
                        break
                else:
                    break

li2=[]      

for i in li:

    li2.append(i.replace('?','a'))
    

li2.sort()


print(li2[0] if li2 else 'UNRESTORABLE')
#!/usr/bin/python
pi = 3.141592
r = int(input())

print("{0:5f} {1:5f}".format(r ** 2 * pi, 2 * r * pi))

### FIXED CODE ###

#!/usr/bin/python
import math
r = float(input())

print("{0:5f} {1:5f}".format(r ** 2 * math.pi, 2 * r * math.pi))
def input_from_console():
    n, x = map(int, input().split())
    l_list = list(map(int, input().split()))
    return n, x, l_list


def solve(n, x, l_list):
    result = 0
    position = 0
    for i in range(n+1):
        if position > x:
            return result
        result +=1
        position += l_list[i]
    return result



def main():
    n, x, l_list = input_from_console()
    print(solve(n, x, l_list))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()


### FIXED CODE ###

def input_from_console():
    n, x = map(int, input().split())
    l_list = list(map(int, input().split()))
    return n, x, l_list


def solve(n, x, l_list):
    result = 0
    position = 0
    for i in range(n):
        if position > x:
            return result
        result +=1
        position += l_list[i]
    if position > x:
        return result 
    else:
        return result + 1



def main():
    n, x, l_list = input_from_console()
    print(solve(n, x, l_list))


if __name__ == "__main__":
    import sys

    if sys.gettrace():  # Check if the python interpreter is in debug mode or not.
        check_cases()
    else:
        main()
N = int(input())
u = [list(map(int, input().split())) for _ in range(N)]

Y=0
for i in u:
    if i[i,0]=="JPY":
        Y+=u[i,1]
    else:
        Y+=u[i,1]*380000

print(Y)

### FIXED CODE ###

N = int(input())
u = [input().split() for _ in range(N)]

Y=0
for i in range(N):
    if u[i][1]=="JPY":
        Y+=float(u[i][0])
    else:
        Y+=float(u[i][0])*380000

print(Y)
N,A,B=map(int,input().split())

import numpy as np
ball=np.array([])
blue=np.array([1]*A)
red=np.array([-1]*B)
while len(ball)<N:
    ball=np.concatenate([ball, blue, red])
print(np.count_nonzero(ball==1))

### FIXED CODE ###

N,A,B=map(int,input().split())

r=N//(A+B)*A
s=N%(A+B)

x=r+min(A,s)
print(x)
a,b=[int(i) fro i in input().split()]
if 0<a and 0<b:
  print("Positive")
elif a*b<=0:
  print("Zero")
elif (b-a)%2==1:
  print("Positive")
else:
  print("Negative")

### FIXED CODE ###

a,b=[int(i) for i in input().split()]
if 0<a and 0<b:
  print("Positive")
elif a*b<=0:
  print("Zero")
elif (b-a)%2==1:
  print("Positive")
else:
  print("Negative")
def main():

    import sys
    input = sys.stdin.readline
    from collections import defaultdict

    class Unionfind:

        __slots__ = ['parents','sizes']

        def __init__(self, n):
            self.parents = list(range(n))
            self.sizes = [1]*n

        def root(self, x):
            if self.parents[x] == x:
                return x
            else:
                root_x = self.root(self.parents[x])
                self.parents[x] = root_x
                return root_x

        def unite(self, x, y):
            x = self.root(x); y = self.root(y)
            if x == y:
                return
            if self.sizes[x] < self.sizes[y]:
                x, y = y, x
            self.sizes[x] += self.sizes[y]
            self.parents[y] = x

        def same(self, x, y):
            return self.root(x) == self.root(y)

        # 集合自体の数 ({1,2}, {3}, {4} : kind -> 3)
        def kind(self):
            for v in range(N):
                self.root(v)
            return len(list(set(self.parents)))

        # xが属する集合の要素の数　({1,2,3} : size(2) -> 3)
        def size(self, x):
            self.sizes[x] = self.sizes[self.root(x)]
            return self.sizes[x]

    N, K, L = map(int,input().split())
    road = Unionfind(N)
    train = Unionfind(N)

    for _ in range(K):
        p, q = map(int,input().split())
        p -= 1; q -= 1
        road.unite(p, q)

    for _ in range(L):
        r, s = map(int,input().split())
        r -= 1; s -= 1
        train.unite(r, s)

    ans_list = []

    r = defaultdict(set)
    t = defaultdict(set)
    for i in range(N):
        r[road.root(i)].add(i)
        t[train.root(i)].add(i)

    ans_list = []

    for i in range(N):
        ans = len(r[road.root(i)] & t[train.root(i)])
        ans_list.append(ans)

    print(*ans_list)

if __name__ == "__main__":
    main()

### FIXED CODE ###

S = input()
S = S.replace("eraser","@").replace("erase","@").replace("dreamer","@").replace("dream","@")
if set(S) == set("@"):
    print("YES")
else:
    print("NO")
import sys
r=sys.stdin.readline
def s():
 for e in iter(r,'0 0'):
  N,M=map(int,e.split())
  k,p=1,0
  S=[int(r()) for _ in[0]*N]
  for d in[int(r())for _ in[0]*M]:
   p+=d if N<=p+d else d+S[p+d]
   if N<=p+1:break
   k+=1
  print(k)
if'__main__'==__name__:s()


### FIXED CODE ###

import sys
r=sys.stdin.readline
for e in iter(r,'0 0\n'):
 N,M=map(int,e.split())
 k,p=1,0
 S=[int(r())for _ in[0]*N]
 for d in[int(r())for _ in[0]*M]:
  p+=d;
  if p<N:p+=S[p]
  if N<=p+1:break
  k+=1
 print(k)
n,a,b = map(int,input().split())
print(min(n*a,b)

### FIXED CODE ###

n,a,b = map(int,input().split())
print(min(n*a,b))
n = int(input())

li = []
for i in range(n):
    li.append(list(input().split()))


for money in li:
    if money[1] == 'JPN':
        continue
    else:
        money[0] = int(money[0]) * 380000.0

sum_money = sum([int(i[0]) for i in li])

print(sum_money)

### FIXED CODE ###

n = int(input())
 
li = []
for i in range(n):
    li.append(list(input().split()))
 
 
for money in li:
    if money[1] == 'JPY':
        continue
    else:
        money[0] = float(money[0]) * 380000.0
 
sum_money = sum([float(i[0]) for i in li])
  
print(sum_money)
a, b = map(int, input.split(''))
ans = a - 2 * b
if ans < 0:
	ans = 0
print(ans)

### FIXED CODE ###


a, b = map(int, input().split(' '))
ans = a - 2 * b
if ans < 0:
	ans = 0
print(ans)
a,b = map(int,raw_input().split(" "))
if a < b:
  print "a < b"
elsif print a > b:
  print "a > b"
else:
  print "a == b"

### FIXED CODE ###

a,b = map(int,raw_input().split(" "))
if a < b:
  print "a < b"
elif a > b:
  print "a > b"
else:
  print "a == b"
n,t=map(int,input().split())
oyu=list(map(int,input.split()))
inl=[]
ans=n*t
for i in range(n-1):
  inl.append(oyu[i+1]-oyu[i])
for i in range(n-1):
  if inl[i]<t:
    ans-=t-inl[i]
print(ans)

### FIXED CODE ###

n,t=map(int,input().split())
oyu=list(map(int,input().split()))
inl=[]
ans=n*t
for i in range(n-1):
  inl.append(oyu[i+1]-oyu[i])
for i in range(n-1):
  if inl[i]<t:
    ans-=t-inl[i]
print(ans)
N, M = list(map(int, input().split()))
A=[0] * M
B=[0] * M

import math

for i in range(M):
  A[i], B[i] = list(map(int, input().split()))

  
island_dict={i+1:i+1 for i in range(N)} #島が属するグループ
group_dict={i+1:1 for i in range(N)} #グループに属する島の数

answer = [0] * M
answer[-1] = math.factorial(N) // (math.factorial(N-2)*2)

  
for i in range(M)[:0:-1]:
  if island_dict[A[i]] == island_dict[B[i]]:
    answer[i-1] = answer[i]
  else:
    groupA = island_dict[A[i]]
    groupB = island_dict[B[i]] #グループ合併, groupB消滅
    NA = group_dict[groupA]
    NB = group_dict[groupB]
    
    for j in group_dict[groupB]:
      island_dict[j] = groupA
   
    group_dict[groupA] = group_dict[groupA] + group_dict[groupB]
    group_dict[groupB] = 0
    answer[i-1] = answer[i] - NA*NB

#print(answer)

for i in range(M):
  print(answer[i])
    
    

### FIXED CODE ###

N, M = list(map(int, input().split()))
AB = [list(map(int, input().split())) for _ in range(M)]

roots = [(i,1) for i in range(N+1)] # root, num_islands_in_group

inconveniences = [0]*(M+1)
inconveniences[-1] = N*(N-1)//2 #すべての橋が崩落するとNC2

def find_root(a, roots=roots):
  if roots[a][0] == a:
    return roots[a]
  else:
    roots[a] = find_root(roots[a][0])
  return roots[a]

def reduce_inconvenience_with_unite(a, b, roots=roots):
  root_a, n_a = find_root(a)
  root_b, n_b = find_root(b)
  if root_a == root_b:
    return 0
  else:
    if n_a > n_b:
      roots[root_a] = (root_a, n_a + n_b) # 二項目は何でも良い
      roots[root_b] = (root_a, n_a + n_b)
    else:
      roots[root_a] = (root_b, n_a + n_b) # 二項目は何でも良い
      roots[root_b] = (root_b, n_a + n_b)
    return n_a * n_b

for i, ab in enumerate(AB[:0:-1]): #実は1個めの橋は全く関係ない
  a, b = ab
  inconveniences[M-1-i] = inconveniences[M-i] - reduce_inconvenience_with_unite(a,b)

for inc in inconveniences[1:]:
  print(inc)
N=int(input())
A=list(map(int,input().split()))
counter=1
res=(A[1]>=A[0])
if N==1:
    print(1)
else:
    for i in range(N-1):
        if A[i+1]<A[i] and res:
            res=False
            counter+=1
        elif A[i+1]>A[i] and not res:
            res=True
            counter+=1
    print(counter)


### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))
counter=1
res=0
for i in range(len(A)-1):
    if (A[i+1]<A[i] and res>0) or (A[i+1]>A[i] and res<0):
        counter+=1
        res=0
    elif A[i+1]!=A[i]:
        res=A[i+1]-A[i]


print(counter)
n,a = map(int,input().split())
print(n**n-a)

### FIXED CODE ###

n=int(input())
a = int(input())
print(n*n-a)
n,k=map(int,input().split())
*v,=map(int,input().split())
motimono=[]
ans=[]
if k>=n:
    k-=n
    ans.append(sum(v))
    v.sort()
    for i in range(k):
        v[i]=0
        ans.append(sum(v))
    
    print(max(ans))
else:
    v*=2
    for j in range(1,k+1):
        for i in range(n-j,n+1):
            motimono=v[i:i+j]
            ans.append(sum(motimono))
            motimono.sort()
            for i in range(min(k-j,len(motimono))):
                motimono[i]=0
                ans.append(sum(motimono))
    print(max(ans))


### FIXED CODE ###

from heapq import*
n,k=map(int,input().split())
*v,=map(int,input().split())
motimono=[]
ans=[]
if k>=n:
    k-=n
    heapify(v)
    ans.append(sum(v))
    for i in range(k):
        if len(v)>0:
            heappop(v)
        ans.append(sum(v))
    print(max(ans))
else:
    v*=2
    for j in range(1,k+1):
        for i in range(n-j,n+1):
            motimono=v[i:i+j]
            ans.append(sum(motimono))
            heapify(motimono)
            for i in range(k-j):
                if len(motimono)>0:
                    heappop(motimono)
                ans.append(sum(motimono))
    print(max(ans))
from flactions import gcd 
from collections import defaultdict

def to_irreducible(a, b):
    if a == 0:
        return [0, 1]
    GCD = gcd(a, b)
    return [a//GCD, b//GCD]

MOD = 10**9 + 7
N = int(input())
daiichi_dict = defaultdict(int)
daini_dict = defaultdict(int)
zero_cases = 0

for i in range(N):
    a, b = map(int, input().split())
    if a == 0 and b == 0:
        zero_cases += 1
    elif a * b >=0 and b != 0:
        a, b = to_irreducible(abs(a), abs(b))
        daiichi_dict[(a,b)] += 1
    else:
        a, b = to_irreducible(abs(b), abs(a))
        daini_dict[(a,b)] += 1
        daiichi_dict[(a,b)] += 0


ans = 1 
for key, value_daiichi in daiichi_dict.items():
    value_daini = daini_dict[key]
    ans *= (2**value_daiichi + 2**value_daini -1)
    ans %= MOD
print((ans+zero_cases-1) % MOD)


### FIXED CODE ###

n=int(input())

mod=10**9+7

#初期値が0の辞書
from collections import defaultdict
pp = defaultdict(lambda: 0) 
pm = defaultdict(lambda: 0) 

def seiki(x,y):
    tmp=gcd(x,y)
    return (x//tmp,y//tmp)

from math import gcd
zero=0
for _ in range(n):
    a,b=map(int,input().split())

    if a==0 and b==0:
        zero+=1
    elif a*b>0:
        tmp=seiki(abs(a),abs(b))
        pp[tmp]+=1
    elif a==0:
        pp[(1,0)]+=1
    elif b==0:
        pm[(1,0)]+=1
        pp[(1,0)]+=0
    else:
        tmp=seiki(abs(b),abs(a))
        pm[tmp]+=1
        pp[tmp]+=0
#print(pm)
#print(pp)
result=1
for key in pp.keys():
    pp_v=pp[key]
    pm_v=pm[key]
    result*=(pow(2,pm_v,mod)+pow(2,pp_v,mod)-1)
    result%=mod

print((result-1+zero)%mod)
h, w = map(int, input().split())

ans_wsplit = [max(abs((i * w) - (((h - i) + 1) // 2) * w), abs((i * w) - ((h - i) // 2) * w)) for i in range(1, h - 1)]
ans_hsplit = [max(abs((i * h) - (((w - i) + 1) // 2) * h), abs((i * h) - ((w - i) // 2) * h)) for i in range(1, w - 1)]

ans_wline = [max(abs((i * w) - ((w + 1) // 2) * (h - i)), abs((i * w) - (w // 2) * (h - i))) for i in range(1, h - 1)]
ans_hline = [max(abs((i * h) - ((h + 1) // 2) * (w - i)), abs((i * h) - (h // 2) * (w - i))) for i in range(1, w - 1)]

print(min(*ans_wsplit, *ans_hsplit, *ans_wline, *ans_hline))


### FIXED CODE ###

h, w = map(int, input().split())

ans_wsplit = [max(abs((i * w) - (((h - i) + 1) // 2) * w), abs((i * w) - ((h - i) // 2) * w)) for i in range(1, h)]
ans_hsplit = [max(abs((i * h) - (((w - i) + 1) // 2) * h), abs((i * h) - ((w - i) // 2) * h)) for i in range(1, w)]

ans_wline = [max(abs((i * w) - ((w + 1) // 2) * (h - i)), abs((i * w) - (w // 2) * (h - i))) for i in range(1, h)]
ans_hline = [max(abs((i * h) - ((h + 1) // 2) * (w - i)), abs((i * h) - (h // 2) * (w - i))) for i in range(1, w)]

print(min(ans_wsplit + ans_hsplit + ans_wline + ans_hline))
num = list(input().split())

A = int(num[0])
B = int(float(num[1])*100
print(A*B//100)

### FIXED CODE ###

a,b = input().split()

a = int(a)
b = int(float(b)*1000)
print(int(a*b)//1000)
n,w=map(int,input().split())
wv=[]
v=[]
for i in range(n):
    a,b=map(int,input().split())
    wv.append([a,b])
    v.append(b)
v.sort(reverse=True)
ans=0
w0=wv[0][0]
for i in range(1,n+1):
    wp=w-w0*i
    if wp<0:
        continue
    elif wp>=3*i:
        ans=max(ans,sum(v[:i]))
    else:
        dp=[-1 for iii in range(wp+1)]
        dp[0]=0
        for j in range(n):
            for k in range(wp,-1,-1):
                if dp[k]>=0:
                    dp[k+wv[i][0]-w0]=max(dp[k]+wv[i][1],dp[k+wv[i][0]-w0])
        ans=max(max(dp),ans)
print(ans)

### FIXED CODE ###

n,w=map(int,input().split())
wv=[]
v=[]
for i in range(n):
    a,b=map(int,input().split())
    wv.append([a,b])
    v.append(b)
v.sort(reverse=True)
ans=0
w0=wv[0][0]
wp=3*n+1
dp=[[-1 for jjj in range(n+1)] for iii in range(3*n+1)]
dp[0][0]=0
for i in range(n):
    for jj in range(n-1,-1,-1):
        for k in range(wp-1,-1,-1):
            if dp[k][jj]>=0 and k+wv[i][0]-w0<=wp-1:
                dp[k+wv[i][0]-w0][jj+1]=max(dp[k][jj]+wv[i][1],dp[k+wv[i][0]-w0][jj+1])
for i in range(1,n+1):
    wp=w-w0*i
    if wp<0:
        continue
    elif wp>=3*i:
        ans=max(ans,sum(v[:i]))
    else:
        for j in range(i+1):
            for k in range(wp+1):
                ans=max(dp[k][j],ans)
print(ans)
import math

def main():

    a,b,h,m = map(int,input().split())
    kakub = 6.0*m
    kakua = 30.0*h + (30.0*(m/60.0))
    maxx = max(kakua,kakub)
    minn = min(kakua,kakub)
    if (maxx - 180.0) > minn:
        aug = (360.0 - maxx) + minn
    elif (maxx - 180.0) < minn:
        aug = maxx - minn

    ans = (a**2) + (b**2) -( (2*a*b)*math.cos(math.radians(aug)) )
    print(math.sqrt(ans))



if __name__=='__main__':
    main()

### FIXED CODE ###

import math

def main():

    a,b,h,m = map(int,input().split())
    kakub = 6.0*m
    kakua = 30.0*h + (30.0*(m/60.0))
    maxx = max(kakua,kakub)
    minn = min(kakua,kakub)
    if (maxx - 180.0) > minn:
        aug = (360.0 - maxx) + minn
    elif (maxx - 180.0) < minn:
        aug = maxx - minn
    else:
        aug = 180.0
    
    if aug == 180.0:
        ans=a+b
        print(ans)
    
    else: 
        ans = (a**2.0) + (b**2.0) -( (2.0*a*b)*math.cos(math.radians(aug)) )
        print(math.sqrt(ans))



if __name__=='__main__':
    main()
from math import log
from math import ceil
while(1):
    ans=0
    n,k=map(int,input().split())
    for i in range(1,n+1):
        a=ceil(k/i)
        x=ceil(log(a,2))
        ans+=0.5**x
    print(ans/n)

### FIXED CODE ###

from math import log
from math import ceil
n,k=map(int,input().split())
ans=0
for i in range(1,n+1):
  a=ceil(k/i)
  x=ceil(log(a,2))
  ans+=0.5**x
print(ans/n)
import sys,math
input = sys.stdin.readline

N,M = list(map(int,input().split()))
S = input().rstrip()
T = input().rstrip()

lcm = N*M//math.gcd(N,M)
X_S=list("#"*lcm)
X_T=list("#"*lcm)
for i in range(N):
    X_S[i*lcm//N] = S[i]
for j in range(M):
    X_T[j*lcm//M] =T[j]

for i in range(lcm):
    if X_S[i] == X_T[i] or X_S[i] =='#' or X_T[i] =='#':
        continue
    else:
        print(-1)
        exit()
print(lcm)


### FIXED CODE ###

import sys,math
input = sys.stdin.readline

N,M = list(map(int,input().split()))
S = input().rstrip()
T = input().rstrip()

L = N*M//math.gcd(N,M)

sn = L//M
tm = L//N

for i in range(N//sn):
    if S[i*sn] == T[i*tm]:
        continue
    else:
        print(-1)
        exit()
print(L)
N=int(input())
A=list(map(int,input().split()))

if A[0]-A[1]==1:
  A[0]-=1

for i in range(1,N-1):
  if A[i]-A[i+1]==1:
    A[i]-=1
    if A[i-1]-A[i]==1:
      print('No')
      exit()
 
  elif A[i]-A[i+1]>1:
    print('No')
    exit()
print('Yes')
print(A)

### FIXED CODE ###

N=int(input())
A=list(map(int,input().split()))

for i in range(N-1):
  if A[N-2-i]-A[N-1-i]==1:
    A[N-2-i]-=1
  elif A[N-2-i]-A[N-1-i]>1:
    print('No')
    exit()
print('Yes')
n,k=[int(x) for x in input.split()]
a=[int(x) for x in input.split()]
 
sol=[]
for i in range(n-1):
  sol.append(a[i+1]-a[i])
sol.append(a[0]-a[n-1]+k)
 
sorted(sol)
#unwanted segment of max length removed while printing
print(sum(sol[0:n-1]))


### FIXED CODE ###

k,n=[int(x) for x in input().split()]
a=[int(x) for x in input().split()]
 
sol=[]
for i in range(n-1):
  sol.append(a[i+1]-a[i])
sol.append(a[0]-a[n-1]+k)
 
sol.sort()
print(sum(sol[:n-1]))
a,b=map(int,input().supkit())
print(a*b)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b)
s,n=map(int,input().split())
x=list(int(input()) for _ in range(n))

w0=int(1)
b0=int(0)
cnt=0

for i in range(1,s):
	if i==x[cnt]:
		w1=int(0)
		b1=w0
		w0=w1
		b0=b1
		if cnt<n-1: 
			cnt+=1
	else:
		w1=b0+w0
		b1=w0
		w0=w1
		b0=b1

print((w0+b0)%1000000007) 
#print(w0+b0) 

### FIXED CODE ###

s,n=map(int,input().split())
if n>0:
	x=list(int(input()) for _ in range(n))

w0=int(1)
b0=int(0)
cnt=0

for i in range(1,s):
	if n>0 and i==x[cnt]:
		w1=int(0)
		b1=w0
		w0=w1
		b0=b1
		if cnt<n-1: 
			cnt+=1
	else:
		w1=b0+w0
		b1=w0
		w0=w1
		b0=b1

print((w0+b0)%1000000007)
n = int(input())
m == 0
for i in range(n):
  if len(str(i))%2 != 0:
    m += 1
print(m)

### FIXED CODE ###

n = int(input())
m = 0
for i in range(1,n+1):
  if (len(str(i))-1)%2 == 0:
    m += 1
print(m)