Harryxun/stf_run huggingface dataset:
N,K = map(int, input().split())

L = [N]
c = 2
while c < N**0.5:
    if L[-1] != N//c:
        L.append(N//c)
    c += 1
if c > N**0.5:
    c -= 1
    L.append(c)
else:
    L.append(c)


L.reverse()
dp = [[0 for j in range(c+len(L))] for i in range(K+1)]

for j in range(1, c+1):
    dp[2][j] = N//j
for j in range(1, len(L)):
    dp[2][j+c] = N//L[j]*(L[j]-L[j-1])

for i in range(2, K):
    dp[i+1][1] = sum(dp[i])
    for j in range(2, c+len(L)):
        dp[i+1][j] = dp[i+1][j-1]-dp[i][len(dp[0])+1-j]
        if j > c:
            dp[i+1][j] *= (L[j]-L[j-1])
#    for j in range(1, len(L)):
#        dp[i+1][j+c] *= (L[j]-L[j-1])
        

print(sum(dp[K])%(10**9+7))

### FIXED CODE ###

from itertools import accumulate

N,K = map(int, input().split())
mod = 10**9+7
sqt = int(N**0.5)
cnt = [N // i-N // (i+1) for i in range(1, N//sqt)] + [1]*sqt
x = cnt
for _ in range(K):
    x = [(i*j)%mod for i, j in zip(accumulate(reversed(x)), cnt)]
    

print(x[-1])
a, b, x = map(int, input().split())

if x <= a**2*b/2:
  t = (2*x)/(a*b**2)
else:
  t = (a**3)/(2*(a**2*b-x))
#print(t)

import math
a = math.atan(t)
a = math.degrees(a)
print(90-a)


### FIXED CODE ###

a, b, x = map(int, input().split())

if x == a**2*b:
  print(0)
  exit()

if x <= a**2*b/2:
  t = (2*x)/(a*b**2)
else:
  t = (a**3)/(2*(a**2*b-x))
#print(t)

import math
a = math.atan(t)
a = math.degrees(a)
print(90-a)
from bisect import bisect_left
s= input()
t = input()

d = {}
n = len(s)
ans = 0
for i in range(len(s)):
    if s[i] not in d:
        d[s[i]] = [i+1]
    else:
        d[s[i]].append(i+1)

flag = True
bef = 0
befchar = ""
for c in t:
    if c not in d:
        flag = False
        break
    else:
        if c == befchar:
            temp = bisect_left(d[c],bef)
            if temp == len(d[c]):
                temp = d[c][0]
                ans += temp + (n-bef)
                bef = temp
            else:
                temp = d[c][temp+1]
                ans += temp-bef
                bef = temp
        else:
            temp = bisect_left(d[c],bef)
            if temp == len(d[c]):
                temp = d[c][0]
                ans += temp + (n-bef)
                bef = temp
            else:
                temp = d[c][temp]
                ans += temp-bef
                bef = temp
    befchar=c
    # print(ans)
if flag:
    print(ans)
else:
    print(-1)




# arr = [0,2,4]
# print(bisect_left(arr,1))
# print(bisect_left(arr,5))
# print(bisect_left(arr,3))



### FIXED CODE ###


from bisect import bisect_left
s= input()
t = input()

d = {}
n = len(s)
ans = 0
for i in range(len(s)):
    if s[i] not in d:
        d[s[i]] = [i+1]
    else:
        d[s[i]].append(i+1)

flag = True
bef = 0
befchar = ""
for c in t:
    if c not in d:
        flag = False
        break
    else:
        if c == befchar:
            temp = bisect_left(d[c],bef)
            # print(temp)
            if temp == len(d[c]):
                temp = d[c][0]
                ans += temp + (n-bef)
                bef = temp
            else:
                if temp +1 < len(d[c]):
                    temp = d[c][temp+1]
                    ans += temp-bef
                    bef = temp
                else:
                    temp = d[c][0]
                    ans += temp + (n - bef)
                    bef = temp
        else:
            temp = bisect_left(d[c],bef)
            if temp == len(d[c]):
                temp = d[c][0]
                ans += temp + (n-bef)
                bef = temp
            else:
                temp = d[c][temp]
                ans += temp-bef
                bef = temp
    # print(temp)
    befchar=c
    # print(ans)
# print(d)
if flag:
    print(ans)
else:
    print(-1)




# arr = [0,2,4]
# print(bisect_left(arr,2))
# print(bisect_left(arr,4))
# print(bisect_left(arr,5))
N , K = input().split()
if (N <= 10) :
    print (100 * (10 - int(N)) + int(K))
else :
    print (K)

### FIXED CODE ###

N,R=input().split()
n,r=int(N),int(R)

if n>=10:
    print(r)
else:
    print(r+100*(10-n))
from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall

H, W = map(int, input().split())
# Inf = 10**9

S = [input() for i in range(H)]
dis = [[0]*(H*W) for i in range(H*W)]

for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            continue
        if i - 1 >= 0 and S[i-1][j] != "#":
            dis[i*W+j][(i-1)*W+j] = 1
        if i + 1 < H and S[i+1][j] != "#":
            dis[i*W+j][(i+1)*W+j] = 1
        if j - 1 >= 0 and S[i][j-1] != "#":
            dis[i*W+j][i*W+j-1] = 1
        if j + 1 < H and S[i][j+1] != "#":
            dis[i*W+j][i*W+j+1] = 1

g = floyd_warshall(csgraph_from_dense(dis))

max_ans = 0
for i in range(H*W):
    for j in range(H*W):
        if g[i][j] > max_ans and g[i][j] != float("inf"):
            max_ans = g[i][j]

print(int(max_ans))

### FIXED CODE ###

H, W = map(int, input().split())
Inf = 10**9

S = [input() for i in range(H)]
dis = [[Inf]*(H*W) for i in range(H*W)]

for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            continue
        if i - 1 >= 0 and S[i-1][j] == ".":
            dis[i*W+j][(i-1)*W+j] = 1
        if i + 1 < H and S[i+1][j] == ".":
            dis[i*W+j][(i+1)*W+j] = 1
        if j - 1 >= 0 and S[i][j-1] == ".":
            dis[i*W+j][i*W+j-1] = 1
        if j + 1 < W and S[i][j+1] == ".":
            dis[i*W+j][i*W+j+1] = 1

for i in range(H*W):
    for j in range(H*W):
        for k in range(H*W):
            dis[j][k] = min(dis[j][i] + dis[i][k], dis[j][k])

max_ans = 0
for i in range(H*W):
    for j in range(H*W):
        if i == j or dis[i][j] == Inf:
            continue        
        max_ans = max(dis[i][j], max_ans)

print(max_ans)
N =input()

if N.isdigit() and N >= 1 and  N <= 100:
  if N % 2 == 0:
    ans = N / 2
  else:
    ans = (N - 1) / 2 + 1
  print(ans)
else:
  print('error')


### FIXED CODE ###

N = input()
if N.isdigit() and int(N) >= 1 and  int(N) <= 100:
  if int(N) % 2 == 0:
    ans = int(N) / 2
  else:
    ans = (int(N) - 1) / 2 + 1
  print(int(ans))
else:
  print('error')
N,M=list(map(int, input().split()))
P=[set() for _ in range(N)]
for i in range(M):
    x,y=list(map(int, input().split()))
    x-=1
    y-=1
    P[x].add(y)

dp=[-1]*N

def lpth(n):
    if dp[n]>-1:
        return dp[n]
    l=P[n]
    # print(l)
    if l:
        s=[lpth(k) for k in l]
        # print(s)
        a=max(s)+1
    else:
        a=0
    dp[n]=a
    return a

for i in range(N):
    dp[i]=lpth(i)
print(max(dp))

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
N, M = list(map(int, input().split()))
P = [set() for _ in range(N)]
for i in range(M):
    x, y = list(map(int, input().split()))
    x -= 1
    y -= 1
    P[x].add(y)

dp = [-1]*N


def lpth(n):
    if dp[n] > -1:
        return dp[n]
    l = P[n]
    # print(l)
    if l:
        s = [lpth(k) for k in l]
        # print(s)
        a = max(s)+1
    else:
        a = 0
    dp[n] = a
    return a


for i in range(N):
    dp[i] = lpth(i)
print(max(dp))
# print(dp)
n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
s = sum(a)
card = []

for _ in range(m):
    b, c = map(int, input().split())
    card += [c] * b
card.sort(reverse=True)

i = 0
while card[i] > a[i]:
    s += card[i] - a[i]
    i += 1
    if i == n:
        break
print(s)

### FIXED CODE ###

n, m = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
bc = [list(map(int, input().split())) for _ in range(m)]

bc.sort(reverse=True, key=lambda x:x[1])

i = 0
for b,c in bc:
    for j in range(i, min(n, i+b)):
        if a[j]<c:
            a[j] = c
    i = i+b
print(sum(a))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
 
n = int(readline())
a = list(map(int,readline().split()))

b = [0]*(n+1)
b[-1] = a[-1]
for i in range(n-1,-1,-1):
  b[i] = b[i+1]+a[i]
#print(b)
c = [1]*(n+1)
for i in range(n):
  c[i+1] = (c[i]-a[i])*2
#print(c)
ans = 0
for i in range(n+1):
  m = min(b[i],c[i])
  if m < 0:
    ans = -1
    break
  ans += m
  
if n == 0:
  ans = 1
if a[0] != 0:
  ans = -1
print(ans)

### FIXED CODE ###

a = list(map(int,input().split()))
print(a[2]*60+a[3]-a[0]*60-a[1]-a[4])
friends=input()
friends.split(' ')
friends_all=friends[0]
cakes=input()
cakes.split(' ')
cakes_amount=(sum(cakes))
one_person=cakes_amount//friends_all
if cakes_amount%friends_all==0:
        pass
else:
        one_person+=1
        
preint(one_person)



### FIXED CODE ###

friends=input()
friends=friends.split()
friends_all=friends[0]
person=int(friends_all)+1
cakes=input()
cakes_amount=0
for a in cakes.split():
        cakes_amount+=int(a)
one_person=cakes_amount//person

if cakes_amount%person!=0:
        one_person+=1
else:
        pass
print(one_person)
A, B, X = (int(x) for x in input.split())
if A > X or A + B < X:
  print('No')
else:
  print('Yes')

### FIXED CODE ###

A, B, C = map(int, input().split())
if A == C or (A < C and B >= C - A):
  print('YES')
else:
  print('NO')
count = {} #a~zの出現回数を記録
for i in range(26):
    count[(i)] = 0

while True:
    text = ''
    try:
        text = raw_input()
    except:
        break
    for i in range(len(text)):
        if(ord(text[i]) >= ord('a') and ord(text[i]) <= ord('z')):
            count[(ord(text[i]))-ord('a')] += 1
        if(ord(text[i]) >= ord('A') and ord(text[i]) <= ord('Z')):
            count[(ord(text[i]))-ord('A')] += 1

#出現回数の表示
for i in range(26):
    print '%s : %d' %(unichr(i+ord('a')), count[(i)])

### FIXED CODE ###

count = {}
for i in range(26):
    count[(i)] = 0

while True:
    try:
        x = raw_input()
    except:
        break
    for i in range(len(x)):
        if(ord('a') <= ord(x[i]) and ord(x[i]) <= ord('z')):
            count[(ord(x[i])-ord('a'))] += 1
        elif(ord('A') <= ord(x[i]) and ord(x[i]) <= ord('Z')):
            count[(ord(x[i])-ord('A'))] += 1

for i in range(26):
    print '%s : %d' %(chr(i+ord('a')), count[(i)])
exit(0)
a,b = map(int,input().split())
if (a*b)%2 == 0:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

divisors_8 = [105]

for i in range(107, 200, 2):
    divisors = []
    for j in range(1, 201):
        if i%j == 0:
            divisors.append(j)
    if len(divisors) == 8:
        divisors_8.append(i)

n = int(input())

divisors_8.append(n)
divisors_8.sort()
result = divisors_8.index(n)
divisors_8.remove(n)

if n not in divisors_8:
    print(result)
else:
    print(result+1)
import numpy as np
lis=[]
for i in range(101):
    lis.append(i)
lis.remove(0)

listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;
#print(listA)

X_=listA[0]
X =X_[0]
P =listA[1]

arr = np.array(lis)
P_max = max(P)
P_min = min(P)-1
arr=arr[arr<=P_max]
arr=arr[arr>=P_min]
lis=arr.tolist()
for p in P:
	lis.remove(p)
#print(lis)
lis_=[]
for l in lis:
    lis_.append(abs(l-X))
#print(lis_)
lis_min=min(lis_)
   
def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

print(lis[my_index(lis_, lis_min)])

### FIXED CODE ###

## 動画見てアルゴリズムを知った
listA=[]
while True:
    try:
        listA.append(list(map(int,input().split())))
    except:
        break;

lis=listA[1]
m=max(lis)
lis0=[0]*(m+1)
for i in lis:
    if lis0[i]!=2: 
        j=1
        while i*j<=m:
            lis0[i*j]+=1
            j+=1
            
count=0
for i in lis:
    if lis0[i]==1: count+=1
print(count)
N = input()
ans = (N-N/2)/N
print(ans)

### FIXED CODE ###

import sys
import math

n = input()
n = float(n)
ans = (n - n / 2)
ans = math.ceil(ans)
ans = float(ans / n)
print(ans)
a, b, c = map(input().split())
print(a[0]b[0]c[0])

### FIXED CODE ###

a, b, c = map(str, input().split())
print(a[0]+b[0]+c[0])
def lcm(a, b):
    ca = a
    ca = b
    while b:
        a %= b
        a, b = b, a
    gcd = a
    return ca * cb // gcd


n = int(input())
a = list(map(int, input().split(" ")))
alcm = a[0]
for i in a:
    alcm = lcm(alcm, i)

tot = 0
for num in a:
    tot += alcm // num

print(tot % 1000000007)


### FIXED CODE ###

def gcd(a,b):
  if b == 0:
    return a
  return gcd(b, a % b)

def lcm(a,b):
  return a * b // gcd(a,b)

n = int(input())
av = list(map(int, input().split(' ')))
alcm = 1
for i in av:
  alcm = lcm(alcm, i)

tot = 0
for i in range(n):
  tot += alcm // av[i]

print(tot % 1000000007)
ans=[0]*int(input())
A=list(map(int , input().split())

for a in A:
       ans[a] +=1

print(ans)

### FIXED CODE ###

ans=[0]*int(input())
N=list(map(int,input().split()))

for i in N:
    ans[i-1]+=1
print(*ans)
h,w=map(int,input().split())
a=["."*w]
for i in range(h):
	x=input()
	a.append("."+x+".")
a.append("."*w)
for i in range(h):
	for j in range(w):
		if a[i+1][j+1]=="#":
			if a[i][j+1]=="#" or \
a[i+2][j+1]=="#" or a[i+1][j+2]=="#" or\
a[i+1][j]=="#":
				continue
			else:
				print("No")
				exit()
print("Yes")

### FIXED CODE ###

h,w=map(int,input().split())
a=["."*(w+2)]
for i in range(h):
	x=input()
	a.append("."+x+".")
a.append("."*(w+2))
for i in range(h):
	for j in range(w):
		if a[i+1][j+1]=="#":
			if a[i][j+1]=="#" or \
a[i+2][j+1]=="#" or a[i+1][j+2]=="#" or\
a[i+1][j]=="#":
				continue
			else:
				print("No")
				exit()
print("Yes")
#coding:UTF-8
def LoT(List):
    T1=T2=T3=List[0]
    B=0
    for i in range(1,len(List)):
        if List[i]>T1:
            T2=T1
            T1=List[i]
        if List[i]<T1 and List[i]>T2:
            T3=T2
            T2=List[i]
        if List[i]<T2 and List[i]>T3:
            T3=List[i]
    print(str(T1)+"\n"+str(T2)+"\n"+str(T3))
        
if __name__=="__main__":
    List=[]
    for i in range(10):
        List.append(int(input()))
    LoT(List

### FIXED CODE ###

#coding:UTF-8
def LoT(List):
    List2=sorted(List)
    for i in range(3):
        print(List2[len(List)-1-i])
if __name__=="__main__":
    List=[]
    for i in range(10):
        List.append(int(input()))
    LoT(List)
n=int(input())
sum=0
for i in range(0,n):
        x=float(input())
        y=str(input())
        if(y=='JPY'):
                sum=sum+x
        else:
                z=x*380000.0
                sum=sum+z
print(sum)

### FIXED CODE ###

def main():
    N = int(input())
    total = 0
    for i in range(N):
        money,currency = input().split()
        if currency == "JPY":
            total += float(money)
        else:
            total += float(money)*380000
    print(total)
main()
from collections import deque
N,M = map(int,input().split())

G = [[] for i in range(M)]
for i in range(M):
  x,y = map(int,input().split())
  G[x-1].append(y-1)
  G[y-1].append(x-1)

dist = [-1]*N #全頂点を未訪問に初期化(-1)で未訪問
que = deque([0])   #初期条件 (頂点 0 を初期ノードとする) 
dist[0] = 0 #0を訪問済み

#BFS 開始 (キューが空になるまで探索を行う)
while que:
    v = que.popleft() #キューから先頭要素を取る
    d = dist[v]
    #v から辿れる頂点をすべて調べる
    for w in G[v]:
        if dist[w] > -1:#探索済みの頂点は無視
            continue
        dist[w] = d + 1 #新たな頂点wについて距離情報を更新してキューに追加する
        que.append(w)
# 結果出力 (各頂点の頂点 0 からの距離を見る)
for i in range(N-1):
  print("Yes")
  print(dist[i+1])

### FIXED CODE ###

n,m = map(int,input().split())
map_li = [[] for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    a,b = a-1,b-1
    map_li[a].append(b)
    map_li[b].append(a)

ans_li = [-1]*n
queue=[0]
visited = [False]*n

while queue:
    x = queue.pop(0)
    for g in map_li[x]:
        if visited[g]==False:
            queue.append(g)
            if ans_li[g]==-1:
                ans_li[g]=x
                visited[g]=True 
if -1 in ans_li[1:]:
    print('No')
else:
    print('Yes')
    for ans in ans_li[1:]:
        print(ans+1)
import math

a, b, c, d = list(map(int,input().split(" ")))

n = b - a + 1
lcm =  (c*d) //(math.gcd(c, d))

n_c = b//c - (a-1)//c
n_d = b//d - (a-1)//d
n_cd = b//lcm - (a-1)//lcm

print(n - n_c - n_d + n_cd)

### FIXED CODE ###

def gcd(a, b):
    return a if b == 0 else gcd(b, a%b)
 
def lcm(a, b):
    return a // gcd(a, b) * b

a, b, c, d = list(map(int,input().split(" ")))

n = b - a + 1
n_c = b//c - (a-1)//c
n_d = b//d - (a-1)//d
n_cd = b//lcm(c,d) - (a-1)//lcm(c,d)

print(n - n_c - n_d + n_cd)
N = int(input())
A = list(map(int, input().split()))
MOD = 10 ** 9 + 7

import math
l = 1
for val in A:
    l = (l * val // math.gcd(val, l))
#print(l)

ans = 0
for val in A:
    ans = (ans + l // val) % MOD
print(ans)



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
import math
M = max(A)
MOD = 10 ** 9 + 7

def power_func(a, n, p):
    res = 1 #これは答え
    while n > 0:
        if n & 1:
            res = res * a % p
        a = a * a % p #1が立っているかどうかに関わらず次のaの累乗を用意しておく
        n = n >> 1
    return res

bucket = [0] * (M + 1)
for val in A:
    for i in range(2, math.floor(math.sqrt(val)) + 1):
        #print(val, i)
        temp = 0
        while val % i == 0:
            val //= i
            temp += 1
        bucket[i] = max(bucket[i], temp)
    if val != 1:
        bucket[val] = max(bucket[val], 1)
#print(bucket)

L = 1
for n in range(M + 1):
    L = (L * n ** bucket[n]) % MOD
#print(L)

ans = 0
for val in A:
    ans = (ans + power_func(val, MOD - 2, MOD))
ans = (ans * L) % MOD
print(ans)
n=int(input())
l=sorted(list(map(int,input().split())))
if l[0]>=0:
  c=l[0]
  l1=[]
  for i in range(1,n-1):
    l1.append([c,l[i]])
    c-=l[i]
  score=l[-1]-c
  print(score)
  for i in l1:
    print(i[0],i[1])
  print(l[-1],c)
elif l[-1]<0:
  c=l[-1]
  l1=[]
  for i in range(0,n-1):
    l1.append([c,l[i]])
    c-=l[i]
  print(c)
  for i in l1:
    print(i[0],i[1])
else:
  l1=[]
  l2=[]
  l3=[]
  for i in l:
    if i<=0:
      l1.append(i)
    else:
      l2.append(i)
  c=l1[0]
  for i in range(len(l2)-1):
    l3.append([c,l2[i]])
    c-=l2[i]
  s1=l2[len(l2)-1]
  for i in range(1,len(l1)):
    l3.append([s1,l1[i]])
    s1-=l1[i]
  score=s1-c
  print(score)
  for i in l3:
    print(i[0],i[1])
  print(s1,c)

### FIXED CODE ###

n=int(input())
l=sorted(list(map(int,input().split())))
if l[0]>=0:
  c=l[0]
  l1=[]
  for i in range(1,n-1):
    l1.append([c,l[i]])
    c-=l[i]
  score=l[-1]-c
  print(score)
  for i in l1:
    print(i[0],i[1])
  print(l[-1],c)
elif l[-1]<0:
  c=l[-1]
  l1=[]
  for i in range(0,n-1):
    l1.append([c,l[i]])
    c-=l[i]
  print(c)
  for i in l1:
    print(i[0],i[1])
else:
  l1=[]
  l2=[]
  l3=[]
  for i in l:
    if i<0:
      l1.append(i)
    else:
      l2.append(i)
  c=l1[0]
  for i in range(len(l2)-1):
    l3.append([c,l2[i]])
    c-=l2[i]
  s1=l2[len(l2)-1]
  for i in range(1,len(l1)):
    l3.append([s1,l1[i]])
    s1-=l1[i]
  score=s1-c
  print(score)
  for i in l3:
    print(i[0],i[1])
  print(s1,c)
a, b = map(float, input().split())
if a > b:
    print(str(a) + ' > ' + str(b))
elif a < b:
    print(str(a) + ' < ' + str(b))
elif a == b:
    print(str(a) + ' == ' + str(b))


### FIXED CODE ###

a, b = map(int, input().split())
if a > b:
    print('a > b')
elif a < b:
    print('a < b')
elif a == b:
    print('a == b')
a = input()
b = input()

print(6-a+b)

### FIXED CODE ###

a=int(input())
b=int(input())
print(6-(a+b))
N,W=map(int,input().split())
for i in range(N):
    w[i],v[i]=map(int,input().split())
dp=[[0 for i in range(W+1)] for j in range(N+1)]
for i in range(N):
    for j in range(W+1):
        if j<w[i]:
            dp[i+1][j]=dp[i][j]
        else:
            dp[i+1][j]=max(dp[i][j],dp[i][j-w[i]]+v[i])
print(dp[N][W])

### FIXED CODE ###

N,W=map(int,input().split())
w=[0]*N
v=[0]*N
for i in range(N):
    w[i],v[i]=map(int,input().split())
dp=[0]*(W+1)
for i in range(N):
    j=W
    while j>=w[i]:
        dp[j]=max(dp[j],dp[j-w[i]]+v[i])
        j-=1
print(dp[W])
N=int(input())
a=[input() for i in range(N)]
print(len(collections.Counter(a)))

### FIXED CODE ###

import collections
N=int(input())
a=[]
for i in range(N):
  a.append(input())
print(len(collections.Counter(a)))
import numpy as np
L,A,B,M=(int(i) for i in input().split())
array=np.arange(A,A+B*L-1,B)
result=""
for i in range(L):
    result+=str(array[i])
print(int(result)%M)

### FIXED CODE ###

A=[int(i) for i in input().split()]
print(sum(A)-max(A))
from math import degrees, atan, radians
a, b, x = map(int, input().split())

if(x < 0.5*a*a*b):
    y = x/(0.5*b*a)
    ans = 90-degrees(atan(y/b))
    print(ans)
elif(x == 0.5*a*a*b)    
    print(0)
else:
    y = x/(0.5*a**2)-b
    ans = 90-degrees(atan((a/(b-y))))
    print(ans)

### FIXED CODE ###

from math import degrees, atan, radians
a, b, x = map(int, input().split())

if(x <= 0.5*a*a*b):
    y = x/(0.5*b*a)
    ans = 90-degrees(atan(y/b))
    print(ans)
elif(x == a*a*b):    
    print(0)
else:
    y = x/(0.5*a**2)-b
    ans = 90-degrees(atan((a/(b-y))))
    print(ans)
n, m = map(int,input().split())
a = sorted(map(int,input().split()))[::-1]
c = [0,2,5,5,4,5,6,3,7,6]
dp = {0: 0}
def dfs(n):
    if n < 0:
        return -float('inf')
    if n not in dp:
        dp[n] = max(dfs(n-c[i]) for i in a) + 1      
    return dp[n]
r = []
while n:
    i = max(a, key=lambda x: dfs(n-c[x]))
    r.append(i)
    n -= c[i]
print(''.join(map(str, r)))

### FIXED CODE ###

n, m = map(int,input().split())
a = sorted(map(int,input().split()))[::-1]
c = [0,2,5,5,4,5,6,3,7,6]
dp = [-float('inf')]*(n+1)
dp[0] = 0
for i in range(2, n+1):
    for j in a:
        if i >= c[j]:
            dp[i] = max(dp[i], dp[i-c[j]]+1)
r = []
while n:
    i = max((i for i in a if n>=c[i]), key=lambda x: dp[n-c[x]])
    r.append(i)
    n -= c[i]
print(''.join(map(str, r)))
#!/usr/bin/env python
# coding: utf-8

# In[ ]:


#171C
##One Quadrillion and One Dalmatians

n=int(input())
alpha=[chr(i) for i in range(ord('a'),ord('z'))]
ans=''
while n>0:
    n-=1
    ans=alpha[n%26]+ans
    n//=26
print(ans)



### FIXED CODE ###

#171C
##One Quadrillion and One Dalmatians

n=int(input())
alpha=[chr(i) for i in range(ord('a'),ord('z')+1)]
ans=''
while n>0:
    n-=1
    ans=alpha[n%26]+ans
    n//=26
print(ans)
A,B = map(int,input().split())
if A >= 13:
  print(B)
elif A>=6 and A<=12:
  print(B/2)
elif: A<=5:
  print(0)


### FIXED CODE ###

A,B = map(int,input().split())
if A >= 13:
  print(B)
elif A>=6 and A<=12:
  print(int(B/2))
elif A<=5:
  print(0)
N = int(input())
abc = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*N for _ in range(N)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    for k in range(3):
        for j in range(3):
            if j == k:
                pass
            else:
                dp[k][i+1] =  chmax(dp[k][i+1],dp[k][i]+abc[i+1][j])

ans = 0
for i in range(3):
    ans = chmax(ans,dp[i][N-1])
    
print(ans)

### FIXED CODE ###

#C
N = int(input())
abc = [list(map(int,input().split())) for _ in range(N)]
dp = [[0]*N for _ in range(3)] #i日目の活動をa,b,cで終えた幸福度のmax
dp[0][0] = abc[0][0]
dp[1][0] = abc[0][1]
dp[2][0] = abc[0][2]

def chmax(a,b):
    if a < b:
        return b
    else:
        return a 

for i in range(N-1):
    dp[0][i+1] =  chmax(dp[1][i]+abc[i+1][0],dp[2][i]+abc[i+1][0])
    dp[1][i+1] =  chmax(dp[0][i]+abc[i+1][1],dp[2][i]+abc[i+1][1])
    dp[2][i+1] =  chmax(dp[1][i]+abc[i+1][2],dp[0][i]+abc[i+1][2])


ans = chmax(dp[0][N-1],dp[1][N-1])
ans = chmax(ans,dp[2][N-1])
    
print(ans)
s = input()
n = len(s)
k = int(input())

d = [0] * n
for i in range(n):
    if s[i] != 'a':
        d[i] = ord('z') - ord(s[i]) + 1

ans = list(s)
for i in range(n):
    if d[i] != 0 and d[i] <= k:
        k -= d[i]
        ans[i] = 'a'
    if k == 0: break
    if i == n-1:
        ans[i] = chr(ord(s[i]) + k)

print(''.join(ans))


### FIXED CODE ###

s = list(input())
n = len(s)
k = int(input())

for i in range(n):
    x = ord(s[i]) - ord('a')
    if x == 0 or 26 -x > k: continue
    k -= 26 - x
    s[i] = 'a'

if k:
    s[-1] = chr((ord(s[-1]) - ord('a') + k) % 26 + ord('a'))

print(''.join(s))