Problem:


Score : 400 points

Problem Statement

Takahashi has a water bottle with the shape of a rectangular prism whose base is a square of side a~\mathrm{cm} and whose height is b~\mathrm{cm}. (The thickness of the bottle can be ignored.)

We will pour x~\mathrm{cm}^3 of water into the bottle, and gradually tilt the bottle around one of the sides of the base.

When will the water be spilled? More formally, find the maximum angle in which we can tilt the bottle without spilling any water.

Constraints

All values in input are integers.

1 \leq a \leq 100

1 \leq b \leq 100

1 \leq x \leq a^2b

Input

Input is given from Standard Input in the following format:

a b x

Output

Print the maximum angle in which we can tilt the bottle without spilling any water, in degrees.
Your output will be judged as correct when the absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

2 2 4

Sample Output 1

45.0000000000

This bottle has a cubic shape, and it is half-full. The water gets spilled when we tilt the bottle more than 45 degrees.

Sample Input 2

12 21 10

Sample Output 2

89.7834636934

This bottle is almost empty. When the water gets spilled, the bottle is nearly horizontal.

Sample Input 3

3 1 8

Sample Output 3

4.2363947991

This bottle is almost full. When the water gets spilled, the bottle is still nearly vertical.



Sample input:
2 2 4


Sample output:
45.0000000000

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

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

udeg = 90
deg = 45
ldeg = 0

v = a * a * b

for _ in range(30):
    # 左に傾ける
    
    deg_ = 90 - deg
    rad_ = math.radians(deg_)
    rad = math.radians(deg)
    l = b * math.sin(rad_)
    r = a * math.sin(rad)
    if l > r:
        b_ = b * math.cos(rad_) * (r / l) 
        _v = v - a * (a * math.cos(rad) + b_) * (a * math.sin(rad)) / 2
    else:
        a_ = b * math.sin(rad_) / math.sin(rad)
        _v = a * a_ * b / 2

    if _v < x:
        udeg = deg
    else:
        ldeg = deg
    deg = (udeg + ldeg) / 2

print(deg)

Submission status: Accepted

Solution code:
import math
input_list = input().split()
a = int(input_list[0])
b = int(input_list[1])
v = int(input_list[2])
h_1 = 2 * v / (a * b) # triangle s
h_2 = 2 * v / a ** 2 - b
if h_1 > a:
    deg = math.degrees(math.atan((b - h_2) / a))
else:
    deg = math.degrees(math.atan(b / h_1))
print(deg)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())

bb=x/(a*a)
b1=((2*x)/(a**2))-b
if b1>0 and b1<bb:
    d=math.degrees(math.atan((2*b-(2*x)/(a*a))/a))
elif a*a*b/2 == x:
    d=math.degrees(math.atan(b/a))
elif x==a*a*b:
    d=0
else:
    d=math.degrees(math.atan(b/((2*x)/(a*b))))
print(d)

Submission status: Accepted

Solution code:
import math
A,B,X=map(int,input().split())
if X!=A**2*B:
  if B>=A:
    X/=A
    if X<=(A*B/2):
      tan=B**2/(2*X)
      print(math.degrees(math.atan(tan)))
    else:
      X=A*B-X
      tan=2*X/A**2
      print(math.degrees(math.atan(tan)))    
  elif B<A:
    X/=A
    if X<=(A*B/2):
      tan=B**2/(2*X)
      print(math.degrees(math.atan(tan)))
    else:
      X=A*B-X
      tan=2*X/A**2
      print(math.degrees(math.atan(tan)))
else:
  print(0)

Submission status: Accepted

Solution code:
from scipy.optimize import newton
from scipy.optimize import bisect
import numpy as np

def acinput():
    return list(map(int, input().split(" ")))


def func(s):
    global a,b,x
    #tmp1=(b**2)*np.sin(s)*np.cos(s)*0.5
    #tmp2=(a**2)*0.5/(np.tan(s))
    L=a*np.tan(s)
    tmp2=L*a/2
    tmp1=(b-L)*a
    
    return a*(tmp1+tmp2) -x

def func2(s):
    global a,b,x
    L=b/np.tan(s)
    
    return a*(b*L/2) -x


a,b,x=acinput()

if x<=0.5*(a**2)*b:
    res=newton(func2,1)
else:
    res=newton(func,0.5)

print(180*res/np.pi)

Submission status: Accepted

Solution code:
from math import atan, degrees

a,b,x = map(int,input().split())
h = x / (a*a)
if b/2<=h:
  print(degrees(atan(2*(b-h)/a)))
else:    
  print(degrees(atan((b*b)/(2*a*h))))

Submission status: Accepted

Solution code:
import numpy as np
import math
a,b,x = map(int,input().split())
c = x/a
ans = np.pi/2-math.atan(c*2/b**2)


if round(math.tan(ans)*a,3) < b:
    ans = math.atan(2*(a*b-c)/a**2)
print(180/np.pi*ans)

Submission status: Accepted

Solution code:
from math import atan, pi

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

h = x / (a**2)


border = a**2 * b / 2

if x < border:
    theta = atan(a * (b**2) / 2 / x) * 180 / pi
else:
    theta = atan(2 / a * (b - h)) * 180 / pi

print('{:.10f}'.format(theta))

Submission status: Accepted

Solution code:
import math
A,B,X=map(int, input().split())
C=2*X/(A*B)
if C<=A:
    math.atan(B/C)*(180)/math.pi
    C=2*X/(A*B)
    print(math.atan(B/C)*(180)/math.pi)
else:
    Y=A*A*B-X
    C=2*Y/(A*A)
    
    C=2*Y/(A*A)
    print(math.atan(C/A)*(180)/math.pi)

Submission status: Accepted

Solution code:
import sys
import numpy as np

def main():
    input = sys.stdin.readline
    abx = list(map(np.float64, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
    else:
        y = (2 * x) / (a * a) - b
        if b - y != 0:
            tan = a / (b - y)
            theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
        else:
            theta = 0.


    print(theta)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [side, hight, X] = string_to_int(inputs[0])
    max_size = side * side * hight
    if max_size / X < 2:
        z = (2*X / (side*side)) - hight
        w = hight - z
        sheta = math.atan2(side, w)
        return 90 - math.degrees(sheta)

    else:
        tri_side = 2 * X / (side * hight)
        sheta = math.atan2(hight, tri_side)
        return math.degrees(sheta)


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Accepted

Solution code:
import math
def main():
    a, b, x = map(float, input().split())

    # 底面三角形の高さ
    h = 2*x/(a*b)

    if h > a:
        res = a*a*b-x
        j = res*2/(a*a)
        rad = math.degrees(math.atan2(j,a))
    else:
        rad = math.degrees(math.atan2(b,h))
    #max_cos = (2*x)/(b*h*a)
    #rad = math.asin(max_cos)

    print(rad)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
v = a * a * b
if v / 2 >= x:
    kakudo = 90 - math.degrees(math.atan(2*x/a/b/b))
    print(kakudo)
    
else:
    kakudo = math.degrees(math.atan(2*(v-x)/a/a/a))
    print(kakudo)

Submission status: Accepted

Solution code:
import sys,math
def input():
    return sys.stdin.readline()[:-1]


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

t = x/(a**2)
half = b/2
if t<half:
    a_2 = ((x/a)/b)*2
    b_2 = b
else:
    a_2 = a
    b_2 = (b-t)*2
c = (a_2**2+b_2**2)**0.5
cos1 = ((a_2**2)+(c**2)-(b_2**2))/(2*a_2*c)
print(math.degrees(math.acos(cos1)))

Submission status: Accepted

Solution code:
import math

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

y = x/(a**2)
if y == b/2:
    c = math.sqrt(a**2+b**2)
    print(math.degrees(math.asin(a/c)))
elif y > b/2:
    c = math.sqrt(a**2+4*(b-x/a**2)**2)
    print(90 - math.degrees(math.asin(a/c)))
else:
    c = math.sqrt(b**2+(2*x/(a*b))**2)
    print(90 - math.degrees(math.acos(b/c)))

Submission status: Accepted

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


a, b, x = read_ints()

S = x/a

import numpy as np
if S < a*b / 2:
    # 水が三角形になる
    print(np.arctan((b*b)/(2*S))*180/np.pi)
else:
    # 水が△と平行四辺形になる
    print(np.arctan(2*(a*b-S)/(a*a)) * 180/np.pi)

Submission status: Accepted

Solution code:
import math


a, b, x = map(int, input().split())
volume = a * a * b
if x < volume / 2:
    ans = math.degrees(math.atan((a*b*b)/(2*x)))
else:
    ans = math.degrees(math.atan(2*(a * a * b - x)/(a ** 3)))
print(ans)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
t=x/a**2
if t/b>=0.5:
    print(math.degrees(math.atan((b-t)*2/a)))
else:
    t=x/(a*b)
    print(90-math.degrees(math.atan((t*2)/b)))

Submission status: Accepted

Solution code:
import math
a,b,x=map(int, input().split())

v=x/a
if v>a*b/2:
    r=(a*b-v)/a*2
    r1=math.sqrt(a**2+r**2)
    w=math.asin(r/r1)
    print(math.degrees(w))

else:
    r=v/b*2
    r1=math.sqrt(b**2+r**2)
    w=math.asin(b/r1)
    print(math.degrees(w))

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
from numpy import linalg as LA


a,b,x = [int(x) for x in stdin.readline().rstrip().split()]

if x >= (a**2)*b/2:
    takasa = b-(2*x-(a**2)*b)/(a**2)

    u = np.array([takasa,a])
    v = np.array([b,0])

    i = np.inner(u, v)
    n = LA.norm(u) * LA.norm(v)

    c = i / n
    j = np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))

    print(90-j)

else:
    takasa = 2*x/(a*b)
    u = np.array([b,takasa])
    v = np.array([b,0])

    i = np.inner(u, v)
    n = LA.norm(u) * LA.norm(v)

    c = i / n
    j = np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))

    print(90-j)

Submission status: Accepted

Solution code:
import sys,collections,math,random;sys.setrecursionlimit(10**7)
def Is(): return [int(x) for x in sys.stdin.readline().split()]
def Ss(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b,x = Is()
y = 2*(b - (x/a**2))
if y <= b:
    print(math.degrees(math.atan2(y,a)))
else:
    print(math.degrees(math.atan2(b,2*x/a/b)))

Submission status: Accepted

Solution code:
import math

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

b_1 = x / (a ** 2)
area_1 = a * b_1
area_2 = (a * b) / 2

if b_1 == b:
    ans = 90
elif area_2 > area_1:
    # 三角形
    h = (a * b_1 * 2) / b
    ans = math.degrees(math.atan(h / b))
else:
    # 梯形
    upside_len = b_1 * 2 - b
    ans = math.degrees(math.atan(a / (b - upside_len)))

print(90 - ans)

Submission status: Accepted

Solution code:
import math
a,b,x = [int(i) for i in input().split()]

if x <= (a**2*b)/2:
    height = x/(a*b)*2
    #余弦定理
    c = b**2 + height**2 - 2*b*height*math.cos(math.radians(90))
    h2 = b*height / math.sqrt(c)
    theta = math.degrees(math.asin(h2/height))
    print(theta)
elif x < (a**2*b):
    square = a**2*b-(a**2*b - x)*2
    triangle = (a**2*b-x)
    ratio = square/triangle/2 + 1
    d = b/ratio
    height = triangle/(a*d)*2
    c = d**2 + height**2 - 2*d*height*math.cos(math.radians(90))
    h2 = d*height / math.sqrt(c)
    theta = math.degrees(math.asin(h2/height))
    print(theta)
else:
    print(0)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
import math
a, b, x = map(int, input().split())

org_volume = a ** 2 * b
if x < org_volume / 2:
    y = (2 * x) / (a * b)
    z = np.sqrt(b ** 2 + y ** 2)
    cos = (y ** 2 + z ** 2 - b ** 2) / (2 * y * z)
    print(math.degrees(math.acos(cos)))
else:
    y = b - ((2 * (x - org_volume / 2)) / (a ** 2))
    z = np.sqrt(a ** 2 + y ** 2)
    cos = (a ** 2 + z ** 2 - y ** 2) / (2 * a * z)
    print(math.degrees(math.acos(cos)))

Submission status: Accepted

Solution code:
import math

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

if a*a*b*(1/2) >= x:
    degree = math.degrees(math.atan(a*b*b/(2*x)))
else:
    degree = math.degrees(math.atan((2.0*(b-(x/(a*a))))/a))

print(degree)

Submission status: Accepted

Solution code:
import math
a,b,x = input().split()
a,b,x = int(a),int(b),int(x)


if(x<=(a*a*b)/2):
    S = x/a
    h = (2*S/b)
    print(90.-math.atan(h/b)/(2.*math.pi)*360)
else:
    #a,x = math.sqrt(a),math.sqrt(x)
    x /= a
    d = 2*x/a-b
    if(b==d):
        print(0)
    else:
        print(90.-math.atan(a/(b-d))*360/(2*math.pi))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b,x=LI()

  c=(2*x)/(a*a)-b

  if c>=0:
    tanx=(b-c)/a
    return math.degrees(math.atan(tanx))

  c=(2*x)/(a*b)
  tanx=b/c
  return math.degrees(math.atan(tanx))

# main()
print(main())

Submission status: Accepted

Solution code:
import math 

arr = input().split()
a = int(arr[0])
b = int(arr[1])
x = int(arr[2])
if b*a*a > x:
    ans1 = 90-math.atan(a*a*a/(2.0*(b*a*a-x)))/math.acos(-1)*180
else:
    ans1 = 0.0
ans2 = math.atan(a*b*b/2/x)/math.acos(-1)*180

if a*a*b/2 <= x:
    print (ans1)
else:
    print (ans2)

Submission status: Accepted

Solution code:
"""
https://atcoder.jp/contests/abc144/tasks/abc144_d
"""
import numpy as np


def calc(a: int, b: int, x: int) -> float:
    half_v = a ** 2 * b / 2
    if x == half_v:
        return 45.0
    elif x > half_v:
        return calc_1(a, b, x)
    else:
        return calc_2(a, b, x)


def calc_1(a: int, b: int, x: int) -> float:
    tan_theta = a ** 3 / (2 * (a ** 2 * b - x))
    theta_rad = np.arctan(tan_theta)
    return float(np.degrees(theta_rad))


def calc_2(a: int, b: int, x: int) -> float:
    tan_theta = 2 * x / (a * b ** 2)
    theta_rad = np.arctan(tan_theta)
    return float(np.degrees(theta_rad))


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    a, b, x = load_input_as_int_array()
    result = calc(a, b, x)
    print(90 - result)


main()

Submission status: Accepted

Solution code:

def nums():
    return list(map(int,input().split(" ")))
def num():
    return int(input())
def yakusu(n):
    res = set()
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            res.add((i,int(n/i)))
    return res
"""
a,b = nums()
if a <= 9 and b <= 9:
    print(a * b)
else:
    print(-1)
"""
"""
n = num()
qq = []
for i in range(10):
    for j in range(10):
        qq.append(i * j)
if n in qq:
    print("Yes")
else:
    print("No")
"""
"""
N = num()
y = yakusu(N)

min = -1

for i in y:
    x,y = i
    if min == -1:
        min = x + y
    elif min > x + y:
        min = x+y

print(min-2)
"""

import math as m
a,b,x = nums()
t = a**2 * b
if (x < (t/2)):
    w = (x * 2) / (a*b)
    ans = m.atan(w/b)
    print(90 - m.degrees(ans))
else:
    yoyu = t - x
    yh = (yoyu *2 ) / a / a
    ans = m.atan(yh/a)
    print(m.degrees(ans))
#E
"""
N,K = nums()
As = nums()
As.sort(reverse=True)
Fs = nums()
Fs.sort(reverse=True)
costs = []
idx = 0
for f in Fs:
    print(f"K={K},F({idx})={f},A({idx})={As[idx]}")
    s_cost = As[idx]
    if f > K and K > 0:
        if s_cost >= K:
            s_cost -= K
            K = 0
        else:
            K -= s_cost
            s_cost = 0
        costs.append((f,s_cost))
    if K > 0:
        if s_cost >= K:
            s_cost -= K
            K -= f
        else:
            K -= s_cost
            s_cost = 0
            
        costs.append((f,s_cost))
    else:
        costs.append((f,s_cost))
    idx += 1
print("---")
res = []
for i in costs:
    c,s = i
    res.append(c*s)
    print(f"{c}x{s},",end="")
print(max(res))
"""

Submission status: Accepted

Solution code:
import math

a, b, x = [int(a) for a in input().split()]

if x >= a * a * b / 2:
    ans = math.degrees(math.atan2(2 * a**2 * b - 2 * x, a**3))
else:
    ans = math.degrees(math.asin( (a * b**2) / math.sqrt( 4 * x**2 + a**2 * b**4) ))

print(ans)

Submission status: Accepted

Solution code:
import math

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

q = a*b*b/2/x
w = (2*b-2*x/a**2)/a

if 2*x/a/b <= a:
  print(math.degrees(math.atan(q)))
else:
  print(math.degrees(math.atan(w)))

Submission status: Accepted

Solution code:
# D
import numpy as np

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

if X/A < A*B/2:
  print(np.arctan(A*B*B/X/2) * 180 / np.pi)
else:
  print(np.arctan(2*B/A-2*X/A/A/A) * 180 / np.pi)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
g = b * a * a
if x > (g / 2):
    d = math.atan(2 * (g - x)/ a**3)
    print(math.degrees(d))
else:
    d = math.atan(2 * x /(a * b * b))
    print(90 - math.degrees(d))

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
v=a*a*b
if v <= 2*x:
    b1=(v-x)/a*2/a
    c=math.sqrt(a**2+b1**2)
    print(math.degrees(math.acos(a/c)))
else:
    a1=((x/a)*2)/b
    c=math.sqrt(a1**2+b**2)
    print(math.degrees(math.asin(b/c)))

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h == H:
        return 90
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))

Submission status: Accepted

Solution code:
import numpy as np
import math

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

h = x / (a * a)

h2 = (b - h) * 2

if h2 <= b:
    deg = math.degrees(math.atan(h2 / a))
else:
    h3 = ((x / a) / b) * 2
    deg = math.degrees(math.atan(b / h3))

print(deg)


"""

"""

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.extend(要素)
.insert(場所,要素)
del 配列名[場所]
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''
'''
sort()50
sorted(reverse=true)
'''
'''
2分探索
bisect.bisect_left(リスト, 要素)
'''
data = stdin.readline().rstrip().split()
a = float(data[0])
b = float(data[1])
x = float(data[2])
if (b * a * a >= 2 * x):
    print(90.0 - math.degrees(math.atan(2 * x / (a * b * b))))
elif (not a * a * b == x):
    print(90.0 - math.degrees(math.atan(a * a * a / (2 * a * a * b - 2 * x))))
else:
    print(0.0)

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
import math

def gets(a,b,c):
    flg=True
    tanc=math.tan(c)
    if tanc>b/a:
        flg=False
    
    if flg:
        ans=a*b-a*a*math.tan(c)/2
    else:
        ans=(b*b/math.tan(c))/2
    return ans*a

now=45
haba=22.5

"""
for i in range(90):
    m=i-0.0001
    print(gets(a,b,math.radians(i)))

print()    
"""

if a*a*b==x:
    print(0)
else:
    
    
    for bis in range(100000):
        c=math.radians(now)
        #print(gets(a,b,c),now,haba)
        res=gets(a,b,c)
        if abs(res-x)<10**-15:
            print(now)
            break
        elif res<x:
            now=(now-haba)
        else:
            now=(now+haba)
        haba/=2
    else:
        print(now)

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
import math

if x <= a **2 * b / 2:
    tan_theta = 2 * x / (a * b ** 2)
    radian = math.atan(tan_theta)
    degrees = 90 - math.degrees(radian)

    print(degrees)
else:
    tan_theta = 2 * b / a - 2 * x / a**3
    radian = math.atan(tan_theta)
    degrees = math.degrees(radian)
    print(degrees)

Submission status: Accepted

Solution code:
import sys
import math

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

sq = a*a*b

if sq/2 == x:
    print("45.00000000")

elif sq/2 > x:
    t = (x*2)/(a*b)
    d = math.atan(b/t)
    print(math.degrees(d))

else:
    t = 2*b - (2*x)/(a*a)
    d = math.atan(t/a)
    print(math.degrees(d))

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(int, input().split()))
xx = x / a
if xx <= a * b / 2:
    print(90 - math.atan(2 * xx / b ** 2) * 180 / math.pi)
else:
    print(-math.atan(2 * (xx - a * b) / a ** 2) * 180 / math.pi)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())

if a*a*b/2 == x:
    print(math.degrees(math.atan(b/a)))
if a*a*b/2 > x:
    print(math.degrees(math.atan(a*b*b/2/x)))
if a*a*b/2 < x:
    print(math.degrees(math.atan(2*(a*a*b-x)/a/a/a)))

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
if x >= (a*a*b/2):
  print(math.degrees(math.atan(2*(a*a*b-x)/(a*a*a))))
else:
  print(90-math.degrees(math.atan(2*x/(a*b*b))))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

[a, b, x] = [int(i) for i in input().split()]

# 台形の場合の短辺yを求める
y = (2*x / a**2) - b

if y >= 0:
    # yがプラスなら台形の場合で角度を計算
    theta = math.atan((b-y)/a)
else:
    # yがマイナスなら三角形の計算で高さyを求める
    y = (2*x) / (a*b)
    # 三角形の倍の角度を計算
    theta = math.atan(b / y)

print(math.degrees(theta))

Submission status: Accepted

Solution code:
from math import atan, pi
a,b,x = [int(i) for i in input().split()]




ocupado = x/(a*a)



if ocupado == b:
    alfa = pi/2

elif ocupado*2 >= b:
    sobra = b - ocupado

    #alfa = atan(sobra/ocupado)
    alfa = atan(a / (2*(b-ocupado)))
else:
    alfa = atan((2*a*ocupado) / (b*b))
print("%.10f" %(90 - alfa*180/pi))

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b), b)))

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
elif x==a*b:
    print(0)
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Submission status: Accepted

Solution code:
import math
a, b, x = (int(i) for i in input().split())
t = 2 * (b/a - x/(a*a*a))
z = math.atan(b/a)
rad = math.atan(t)

if(rad <= z):
    deg = math.degrees(rad)
else:
    rad = math.atan((a*b*b)/(2*x))
    deg = math.degrees(rad)
print(deg)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())

if x < a * a * b / 2:
    a2 = 2 * x / (a * b)
    print(math.degrees(math.atan2(b, a2)))
else:
    b2 = (2 * a ** 2 * b - 2 * x) / a ** 2
    print(90 - math.degrees(math.atan2(a, b2)))

Submission status: Accepted

Solution code:
from sys import stdin
import math
a, b, x= [int(x) for x in stdin.readline().rstrip().split()]
if a*a*b/2 < x:
    t = 2 * (a*a*b - x) / (a*a*a)
elif a*a*b/2 == x:
    t = 1
if a*a*b/2 > x:
    t = (a*b*b)/(2*x)
print("{0:.10f}".format(math.degrees(math.atan(t))))

Submission status: Accepted

Solution code:
import math
a,b,x=list(map(int,input().split()))
maxv=a*a*b
sukima=maxv-x
teimenseki=sukima/a
y=teimenseki*2/a

if x > (maxv/2):
    print(math.degrees(math.atan(y/a)))
else:
    tei=x/a
    z=tei*2/b
    print(math.degrees(math.atan(b/z)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

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

if (a**2) * b >= 2 * x:
    atan1 = math.degrees(math.atan((2*x)/(a*b**2)))
    print(90.0 - atan1)
else:
    atan1 = math.degrees(math.atan(2*(a**2*b-x)/a**3))
    print(atan1)

Submission status: Accepted

Solution code:
import numpy as np
a,b,x=list(map(int,input().split()))

if a*a*b == x:
  print(0.0)
else:
  if x <= b*a*a/2:
    l =  2*x/(a*b)
    ans = np.arctan(b/l)
  else:
    l=2*x/a**2-b
    ans=np.arctan((b-l)/a)
  print(180.0*ans/np.pi)

Submission status: Accepted

Solution code:
import math


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

if 2*x<a*a*b:
    sit=math.atan((a*b*b)/(2*x))
    print(math.degrees(sit))
elif 2*x>a*a*b:
    p1=2*(a*a*b-x)
    p2=a*a*a
    sit=math.atan(p1/p2)
    print(math.degrees(sit))
else:
    print(45.00000)

Submission status: Accepted

Solution code:
import math
s=list(map(int,input().split()))
a=0
b=0
c=0
if s[0]*s[0]*s[1]<2*s[2]:
  a=(s[0]*s[0]*s[1]-s[2])*2
  b=s[0]*s[0]*s[0]
  c=math.degrees(math.atan(a/b))
else:
  a=s[0]*s[1]*s[1]
  b=2*s[2]
  c=math.degrees(math.atan(a/b))
print(c)

Submission status: Accepted

Solution code:
import math
a,b,x = map(float,input().split())



p1 = ((2*x)/(a*a)) - b
p2 = b - p1

pp1 = (2*(a*a*b-x))/(a*b) -a
pp2 = a - pp1

ans1 = math.degrees(math.atan(p2/a))
ans2 = math.degrees(math.atan(b/pp2))



if x >= a*a*b/2:
  print(ans1)
else:
  print(ans2)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
x_2d = x/a
if a*a*b == x:
    print(0)
    exit()
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))

Submission status: Accepted

Solution code:
import math

def solve():
    a, b, x = map(int, input().split(" "))
    area = float(a * b)
    if x > (area * a / 2.0):
        up_down = float(x / a) * 2.0 / a
        a2 = float(up_down - b)
        b2 = b - a2
        tan = float(b2 / a)
        print('{:.10f}'.format(math.degrees(math.atan(tan))))
        return
    else:
        base = (float(x) / area) * 2.0
        tan = float(base / b)
        print('{:.10f}'.format(90.0 - math.degrees(math.atan(tan))))
        return 

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import math


def run(a, b, x):
    if a*a*b >= 2*x:
        tan = a * (b**2) / (2*x)
    else:
        tan = (2*b) / a - ((2*x) / a**3)
    ret = math.degrees(math.atan(tan))
    return ret


def main():
    a, b, x = map(int, input().split())
    print(run(a, b, x))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

d = x / (a ** 2)
c = -(2 * d - 2 * b)
e = a * d * 2 / b

if a * d < a * b / 2:
    r = math.degrees(math.atan2(b, e))
else:
    r = math.degrees(math.atan2(c, a))

print(r)

Submission status: Accepted

Solution code:
import math

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

div = (x/(a*a))/b
wide = div * a
bottom = wide * 2.0
if bottom <= a:
    print(math.degrees(math.atan2(b,bottom)))
else :
    high = (b - (x/(a*a)))*2
    print(math.degrees(math.atan2(high,a)))

Submission status: Accepted

Solution code:
import math

a, b, x = (int(_) for _ in input().split())

t = (a**2) * b * 0.5
if t >= x:
	s = math.atan((a * (b**2)) / (2 * x))
else:
	s = math.atan((2*b*(a**2)-2*x) / a**3)
print(math.degrees(s))

Submission status: Accepted

Solution code:
import math

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

if (a**2)*b/2 < x :
    print(math.degrees(math.atan(2*(a**2*b-x)/a**3)))
else:
    print(math.degrees(math.atan(a*(b**2)/(2*x))))

Submission status: Accepted

Solution code:
# coding: utf-8
import math
a, b, x = map(int, input().split())
if x >= a**2*b/2:
    ans = 90 - math.degrees(math.atan2(a**3, (2*a**2*b-2*x)))
else:
    # ans = 90 - math.degrees(math.atan2(2*x, (a**2*b-2*x)))
    # ans = 90 - math.degrees(math.asin((2*x*a) / (b*math.sqrt(4*x**2 + a**2*b**4))))
    ans = 90 - math.degrees(math.asin(2*x/math.sqrt(a**2*b**4 + 4*x**2)))
print(ans)

Submission status: Accepted

Solution code:
import math
from decimal import *

a, b, x = map(Decimal, input().split())
c = Decimal(2*(a*a*b-x)/a/a/a)

if x >= a*a*b/2:
    theta = math.degrees(math.atan(c))
else:
    theta = math.degrees(math.atan(a*b*b/2/x))
    
    
print(theta)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())

if a * a * b > 2 * x:
    d = (2*x)/(a*b)
    theta = math.atan2(b,d)
    print(math.degrees(theta))
else:
    d = ((2*x)-(b*a*a))/(a*a)
    theta = math.atan2(b-d,a)
    print(math.degrees(theta))

Submission status: Accepted

Solution code:
import math

a,b,x = map(int, input().split())
box = a*a*b
ans = 0
if x>=box/2:
    z = a*a
    y = 2*x
    y = y/z
    y -= b
    ans = math.degrees(math.atan2(b-y,a))
else:
    z = a*b
    v = 2*x
    v = v/z
    y = a-v
    ans = math.degrees(math.atan2(b, a-y))
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- Coding: utf-8 -*-

import sys
import math


input = sys.stdin.readline


def main():
    a, b, x = [int(i) for i in input().split()]

    if (a*a*b)/2 < x:
        n = (a*b-x/a)*2/a
        print(math.degrees(math.atan(n/a)))

    elif (a*a*b)/2 > x:
        n = x*2/a/b
        print(math.degrees(math.atan(b/n)))
    else:
        print(45.0)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import acos, degrees
a,h,x = (int(x) for x in input().split())
S = x / a
Ss = a*h - S
a_start = a-(2*Ss / h - a)
if a_start > a:
    h_start = 2 * Ss / a
    big = (h_start**2 + a**2) ** 0.5
    angle = degrees(acos(a/big)) 
    
else:
    hb = 2*S / ((h**2+a_start**2)**0.5)
    angle = degrees(acos(hb/h))
print(angle)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
import math

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
#        for line in sys.stdin:
#            lines.append(line)
        lines.append(input())
    else:
        debug = False
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b, x) = [int(e) for e in lines[0].split(" ")]

    return (a, b, x)

def solve(l, h, v):


    max_v =  l * l * h
    tan = 0
    if v > 0.5 * max_v:
        tan = 2*h/l - 2*v/(l*l*l) 
    else:
        tan = h*h*l/(2*v)

    theta = math.atan(tan)

    return math.degrees(theta)

def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r)
    else:
        print("%s" % result)

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
# D
import math
A, B, C = map(int, input().split())
x = C / A**2
height = 2 * x - B
if (height >= 0):
    y = B -height
    print(math.degrees(math.atan(y/A)))
else:
    z = 2*C / (A*B)
    print(math.degrees(math.atan(B/z)))

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(int, input().split(' '))
theta = 0
if x <= a ** 2 * b / 2:
    theta = np.arctan((a * b ** 2) / (2 * x))
else:
    theta = np.arctan(2 * (a ** 2 * b - x) / (a ** 3))
print(np.rad2deg(theta))