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:
import sys
import math
input = sys.stdin.readline

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

area = x / a

if (a * b / 2) == area:
    # 水の量が、傾けた時に、底面と高さぴったりの時
    θ = math.atan(b / a)
elif (a * b / 2) > area:
    # 水の量が、水筒の半分より小さい時
    c = area / b * 2
    θ = math.atan(b / c)
elif (a * b / 2) < area:
    # 水の量が、水筒の半分より大きい時 -> 台形になる時
    # 元々の水面の高さ
    h = x / (a * a)
    # 溢れるまで傾けた時の台形の短い部分のながさ
    # area == (d + b) * a / 2 から下を導き出す
    d = (area / (a / 2)) - b
    # 元々の水面から溢れるまで(bまで)の距離
    increment = h - d
    θ = math.atan(increment / (a / 2))

print(math.degrees(θ))

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline

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

area = x / a

if (a * b / 2) == area:
    # print("just")
    θ = math.atan(b / a)
    # print(θ)
elif (a * b / 2) > area:
    # print("near empty")
    c = area / b * 2
    θ = math.atan(b / c)
    # print(θ)
elif (a * b / 2) < area:
    # print("fill")
    # 元々の水面の高さ
    h = x / (a * a)
    # 溢れるまで傾けた時の台形の短い部分のながさ
    # area == (d + b) * a / 2
    d = (area / (a / 2)) - b
    # 元々の水面から溢れるまで(bまで)の距離
    increment = h - d
    # print("h:{0}, d:{1} increment:{2}".format(h, d, increment))
    θ = math.atan(increment / (a / 2))
    # print(θ)

print(math.degrees(θ))

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

abx = input().split()
a, b, x = int(abx[0]), int(abx[1]), int(abx[2])

area = x / a

ans = 0

if area >= a * b /2:
    ans = math.degrees(math.atan2(2 * b - (2 * area / a), a))
else:
    ans = math.degrees(math.atan2(b, 2 * area / b))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
##D
a,b,x = map(int,input().split())

import math
if x >= a*a*b/2:
    y = 2*(a*a*b-x)/(a*a)
    if y == 0:
        atan1 = 0
    else:
        atan1 = 90-math.degrees(math.atan(a/y))
else:
    y = 2*x/(a*b)
    if y == 0:
        atan1 = 0
    else:
        atan1 = math.degrees(math.atan(b/y))
print(atan1)

Submission status: Accepted

Solution code:
import math

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

if h == b:
    ans=0
elif b/2 <= h <b:
    ans=math.degrees(math.atan(2*(b-h)/a))
else :
    ans=math.degrees(math.atan((a*b*b)/(2*x)))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, degrees
a,b,x = map(int, input().split())
if a**2 * b / 2 < x:
    x = a**2 * b - x
    print('{:.10f}'.format(degrees(atan(x*2 / a/a/a ))))
else:
    print('{:.10f}'.format(90-degrees(atan(2 * x / a / b / b ))))

Submission status: Accepted

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

if x / (b * a**2 ) < 1/2:
    x2 = (2*x) / (a*b)
    y2 = b
else:
    x2 = a
    y2 = 2 * (b-(x / a ** 2))
    


print(degrees(atan2(y2, x2)))

Submission status: Accepted

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

theta1 = math.atan((2/a*(b-x/(a**2))))
if math.tan(theta1) <= 2*x/(a**3):
  print(math.degrees(theta1))
  exit()
else:
  theta2 = math.atan(a*b**2/(2*x))
  print(math.degrees(theta2))

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((2*(a*a*b-x))/(a*a*a))))
else:
    print(math.degrees(math.atan((a*b*b)/(2*x))))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

#use math.degrees() or math.radians()

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


theta = 0

if x <= a**2*b/2: # little water
    #print("check")
    theta = math.atan(a*b*b/(2*x))
    #print(math.degrees(theta))
    #print(theta)
else:
    #print("check2")
    theta = math.atan((2*a**2*b-2*x)/a**3)
    #print(math.degrees(theta))

print(180 * theta / math.pi)

Submission status: Accepted

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

def capa(theta):
    theta = theta*math.pi/180
    if math.tan(theta) < b/a:
        return a*a*(b - a*math.tan(theta)/2)
    else:
        return a*b*b/(2*math.tan(theta))

left = 0
right = 90
while right - left > 10**(- 7):
    mid = (left + right)/2
    if capa(mid) > x:
        left = mid
    else:
        right = mid
print((left + right)/2)

Submission status: Accepted

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

Submission status: Accepted

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

S=x/a

if S<=a*b/2:
    A=S/b*2
    B=b
    print(math.degrees(math.atan2(B,A)))
    
else:
    S=a*b-S
    A=a
    B=S/a*2
    print(90-math.degrees(math.atan2(A,B)))

Submission status: Accepted

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

import math

def f(A,B,X):
    S = X/A

    if S > A*B/2:
        h = 2*S/A - B
        return math.degrees(math.atan((B-h)/A))
    else:
        w = 2*S/B
        return math.degrees(math.atan(B/w))

                    

def main():
    A,B,X = map(int, input().split())
    
    print('{:9f}'.format(f(A,B,X)))




if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np
a,b,x = map(int,input().split())
if x < (a * a * b) / 2:
  ans=np.arctan((a * b * b) / (2 * x))
else:
  ans=np.arctan((2 * b)/a - (2 * x)/(a**3))
ans = 180 * ans / np.pi
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

def vol(a,b,x,d):
    if a**2*b / 2 < x:
        return a**2*b - 1/2*a**3 * m.tan(m.radians(d))
    else:
        return 1/2*a*b**2 * m.tan(m.radians(90-d))

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

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

res = x
d_max = 90
d_min = 0
while res > 10e-8:
    d = (d_max+d_min)/2
    if vol(a,b,x,d) - x > 0:
        d_min = d
    else:
        d_max = d
    res = abs(x - vol(a,b,x,d))

print(d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, x = [int(_) for _ in input().split()]
y = 2 * x / a / a - b
z = 2 * x / a / b
if y > 0:
    t = (b - y) / a
else:
    t = b / z
print(math.degrees(math.atan(t)))

Submission status: Accepted

Solution code:
from math import atan2, degrees

if __name__ == "__main__":
    a, b, x = map(float, input().split())

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

    if h > b:
        h = 2 * x / (a * b)
        ans = degrees(atan2(b, h))
    else:
        ans = degrees(atan2(h, a))

    print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

print(90-theta)

Submission status: Accepted

Solution code:
import math

# 入力を3つの数値として扱う
a, b, x = map(int, input().split())

# 水を真横から見た面積(c)
c = x / a

# 傾けて溢れるのは、2パターン
ad = 0
bd = 0

# 水筒の半分よりおおい：[高さから移動した点(bd)を引く]*[底辺(a)]+[高さから移動した点(bd)]*[底辺(a)]/2がcのとき
# (b - bd) * a + bd * a / 2 = c
if x > a * a * b / 2:
    bd = (2 * b * a - 2 * c) / a

# 水筒の半分以下：[高さ(b)]*[底辺から移動した点(ad)]/2がcのとき
# (b * ad) / 2 = c
else:
    ad = (2 * c) / b

# 角度を求める
if ad == 0:
    r = math.atan(bd / a)
else:
    r = math.atan(b / ad)

# 弧度法から度数法への変換
ans = math.degrees(r)

# 答えの出力
print(ans)

Submission status: Accepted

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

h1 = 0
_tan = 0

if x<=(b*a**2)/2:
	h1 = 2*x/(a*b)
	_tan = h1/b
else:
	h1 = (2*x/a**2)-b
	if b==h1:
		print(0)
		sys.exit()
	else:
		_tan = a/(b-h1)

print(90 - math.degrees(math.atan(_tan)))

Submission status: Accepted

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

if x > capacity/2:
  nokori = capacity - x
  teihen =  nokori / a * 2 / a
  tan = teihen / a
  degree = math.atan(tan)
  ans = math.degrees(degree)
else:
  teihen =  x / a * 2 / b
  tan = b / teihen
  degree = math.atan(tan)
  ans = math.degrees(degree)

print(ans)

Submission status: Accepted

Solution code:
import math

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

if x >= (a**2)*b/2:
  tan = float(2*(b*a**2-x)/a**3)
  theta = math.degrees(math.atan(tan))
  print("{:.10f}".format(theta))
else :
  tan = float((a*b**2)/(2*x))
  theta = math.degrees(math.atan(tan))
  print("{:.10f}".format(theta))

Submission status: Accepted

Solution code:
"""
制約
a,b,xはすべて整数
1≦a≦100
1≦b≦100
1≦x≦a^2b
 
mathライブラリ
tanから角度を求めるとき(math.atan())と
弧度を度数に変換するとき(math.degrees())を用いる。
"""
import math
 
#入力
a, b, x = map(int, input().split())
 
#計算&出力
if a * a * b < 2 * x:
  print(math.degrees(math.atan(2*b/a-2*x/a**3)))
else:
  print(math.degrees(math.atan(a*b*b/(2*x))))

Submission status: Accepted

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

if x >= 0.5 * (a ** 2) * b:
    print(math.degrees(math.atan2(2*((a**2) * b - x), a**3)))
else:
    print(90 - math.degrees(math.atan2(2*x, a*(b**2))))

Submission status: Accepted

Solution code:
import sys
import math
import bisect
 
 
sys.setrecursionlimit(1000000000)
def input():
    return sys.stdin.readline().strip()
 
def iinput():
    return int(input())
 
def finput():
    return float(input())
 
def tinput():
    return input().split()
 
def rinput():
    return map(int, tinput())
 
def rlinput():
    return list(rinput())
 
def modst(a, s):
    res = 1
    while s:
        if s % 2:
            res *= a
        a *= a
        s //= 2
    return res

 
def main():
    a, b, x = rinput()
    p = math.pi
    if x * 2 >= a * a * b:
        print(180 * math.atan((2 * b - x * 2 / a / a ) / a) / p)
    else:
        print(180 / p * math.atan(b / x * a * b / 2))
main()

Submission status: Accepted

Solution code:
import math
abx = list(map(int,input().split()))
a = abx[0]
b = abx[1]
x = abx[2]
if x < a*a*b/2:
    c = 2*x/(b*a)
    d = math.atan(b/c)

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

Submission status: Accepted

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

import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import*
def solve(B):
    α=b*sin((90-B)*pi/180)/sin(B*pi/180)
    s=α*b/2
    if α>a:s-=(α-a)*(b-b*a/α)/2
    return s>=x/a
a,b,x=map(int,input().split())
ok=0
ng=90
while ng-ok>1e-7:
    mid=(ok+ng)/2
    if solve(mid):ok=mid
    else:ng=mid
print(ok)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x = [int(x) for x in input().split()]
ans = 0
if x<=a*b/2*a:
  ans = 2*x/(a*b)
  print(90-math.degrees(math.atan(ans/b)))
else:
  x = a**2*b-x
  ans = 2*x/(a*a)
  print(math.degrees(math.atan(ans/a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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))

Submission status: Accepted

Solution code:
# ABC144d


def main():
    import sys
    import math
    #import numpy as np
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    a, b, x = map(int, input().split())
    if x > a*a*b/2:
        # print(np.rad2deg(np.arctan(2*(a*a*b-x)/(a*a*a))))
        print(math.degrees(math.atan(2*(a*a*b-x)/(a*a*a))))
        exit(0)
    print(math.degrees(math.atan(a*b*b/2/x)))
    # print(np.rad2deg(np.arctan(a*b*b/2/x)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# ABC144d


def main():
    import sys
    import math
    import numpy as np
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    a, b, x = map(int, input().split())
    if x > a*a*b/2:
        print(np.rad2deg(np.arctan(2*(a*a*b-x)/(a*a*a))))
        # print(math.degrees(math.atan(2*(a*a*b-x)/(a*a*a))))
        exit(0)
    # print(math.degrees(math.atan(a*b*b/2/x)))
    print(np.rad2deg(np.arctan(a*b*b/2/x)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math


def solve():
    a, b, x = read()
    result = think(a, b, x)
    write(result)


def read():
    return read_int(3)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b, x):
    eps = 1e-6

    degree_floor = 0.0
    degree_ceil = 90.0

    radian_floor = radian(degree_floor)
    radian_ceil = radian(degree_ceil)

    while True:
        radian_mid = (radian_floor + radian_ceil) / 2.0
        volume = calc_volume(a, b, radian_mid)
        if abs(volume - x) < eps:
            return degree(radian_mid)
        if volume > x:
            radian_floor = radian_mid
        else:
            radian_ceil = radian_mid

    return 0.0


def write(result):
    print(result)


def radian(degree):
    return degree / 180.0 * math.pi


def degree(radian):
    return radian / math.pi * 180.0


def calc_volume(a, b, theta):
    theta_threshold = math.atan(b / a)

    if theta >= theta_threshold:
        a_dash = b * math.cos(theta) / math.sin(theta)
        v = a * a_dash * b / 2.0
        return v
    else:
        h_dash = a * math.tan(theta)
        h_dash_dash = b - h_dash
        v_1 = a * a * h_dash / 2.0
        v_2 = a * a * h_dash_dash
        return v_1 + v_2


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from math import atan, degrees

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

if a * a * b / 2 < x:
    tan_theta = 2 * (a * a * b - x) / (a ** 3)
else:
    tan_theta = (a * b * b) / (2 * x)

print(degrees(atan(tan_theta)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
A,B,X=map(int,input().split())
X/=A
if A*B/2<=X:
	print(np.rad2deg(np.arctan(2*(A*B-X)/(A*A))))
else:
    print(np.rad2deg(np.arctan(B*B/(2*X))))

Submission status: Accepted

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

import math

if x <= rect / 2:
    s = x / (a**2) * a
    angle = 90 - math.atan((2 * s) / (b**2)) * (180 / math.pi)
else:
    s = (a**2 * b-x)/(a**2) * a
    angle = math.atan((2 * s) / (a**2)) * (180 / math.pi)

print(angle)

Submission status: Accepted

Solution code:
# D - Water Bottle
from math import atan, degrees
a,b,x = map(float, input().split())
s = x/a
print( degrees( atan( b/(s/b*2) if s<a*b/2 else (b-s/a)*2/a ) ) )

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.pi / 2 - math.atan(2 * x / (a * b ** 2))))

Submission status: Accepted

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

import math

if x <= a*a*b*0.5:
  print(90-math.atan(x/b/b/a*2)*180/math.pi)
else:
  y = a*a*b-x
  print(math.atan(y/a/a/a*2)*180/math.pi)

Submission status: Accepted

Solution code:
import math


def binarySearch(l, r):
    while r - l > eps:
        mid = (l+r)/2
        if f(mid):
            r = mid
        else:
            l = mid
    return r


def f(mid):
    if h1 >= b / 2:
        c = b - h1 - (a / 2 * math.tan(mid)) <= 0
    else:
        c = 2 * h2 - (b * math.tan(math.pi / 2 - mid)) >= 0
    return c


a, b, x = map(int, input().split())
eps = 10 ** -12
r = 90 * 10 ** 6
h1 = x / a ** 2
h2 = x / (a * b)
e = binarySearch(0, 90 * math.pi / 180)
print(e / math.pi * 180)

Submission status: Accepted

Solution code:
import math

a,b,x=map(int,input().split())
half = a*b*a/2

tan1=(b*b*a)/(2*x)
tan2=(2*b/a) - 2*x/(a**3)

if x>=half:
    print(math.degrees(math.atan(tan2)))
else:
    print(math.degrees(math.atan(tan1)))

Submission status: Accepted

Solution code:
import math

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

deg = 0
enp = a*a*b - x

if(x == a*a*b/2): #半分
    ans = 45
elif(x > a*a*b/2): #多い
    ans = math.degrees(math.atan2(2*enp,a*a*a))
else: #少ない
    ans = math.degrees(math.atan2(a*b*b,2*x))
    
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
a, b, x = map(int, input().split())
if x >= a*a*b/2:
    l = 2*b - 2*x/(a**2)
    print(np.rad2deg(np.arctan(l/a)))
else:
    l = 2*x/(a*b)
    print(np.rad2deg(np.arctan(b/l)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
flag = False
if x > a*a*b/2:
  x = a*a*b - x
  flag = True
if flag:
    print(math.degrees(math.atan2(x/a/a*2, a)))
else:
    print(math.degrees(math.atan2(b, x/a/b*2)))

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
if x >= a*a*b / 2:
    flag =1
    l = b-(x*2/(a*a)-b)
    res = math.atan(l/a)*180/math.pi
else:
    flag = 2
    l = x*2/(a*b)
    res = math.atan(b/l)*180/math.pi
print(res)

Submission status: Accepted

Solution code:
#abc144d
import math

a,b,x=map(float,raw_input().split())
if x/a>a*b/2:
 res=2*(b/a-x/a**3)
else:
 res=a*b**2/(x*2)
print math.degrees(math.atan(res))

Submission status: Accepted

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

h = x / (a * a)

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

Submission status: Accepted

Solution code:
import math

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

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

else:
    h = x*2 / (a*b)
    theta = math.atan(h/b)
    print(90 - math.degrees(theta))

Submission status: Accepted

Solution code:
import numpy as np
a,b,V = map(int, input().split())
x = V/(a*a)
"""
算数の解
"""
# if b >= 2*x:
#     tan = b**2/(2*a*x)
# else:
#     tan = 2*(b-x)/a
# ans = np.arctan(tan)
# print(ans*180/np.pi)


"""
二部探索
"""
def f(theta):
    if np.tan(theta) < (2*x)/a:
        l = x + a*np.tan(theta)/2
    else:
        l = (2*a*x*np.tan(theta))**0.5
    return l >= b


eps = 10**-12
def  binarySearch(l,r):
    while r - l > eps:
        mid = (l+r)/2
        if f(mid):
            r = mid
        else:
            l = mid
    return r

print(binarySearch(-1*np.pi/180,(np.pi/2-eps))*180/np.pi)

Submission status: Accepted

Solution code:
import math

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

print(math.degrees(ans))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

ans = 0
if a * a *b / 2.0 <= x:
    ans = math.atan(2 * (a * a * b - x) / (a * a * a))
else:
    ans = math.pi / 2 - math.atan(2 * x / (a * b * b))

print(math.degrees(ans))

Submission status: Accepted

Solution code:
import math

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

result = 0

if S >= a * b / 2:
    result = (2 * (a * b - S)) / a
    result = math.degrees(math.atan(result / a))
elif S < a * b / 2:
    result = (2 * S) / b
    result = math.degrees(math.atan(b / result))

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi

a,b,v = map(int, input().split())
if v == a*a*b:
  theta = pi/2
elif v*2 < a*a*b:
  e= v*2/(a*b)
  theta = atan(e/b)
else:
  e = 2*(a*b - v/a)/a
  theta = atan(a/e)
theta *= 180/pi
print(90.0 - theta)

Submission status: Accepted

Solution code:
# coding: utf-8
# submission # - User: herp_sy
# https://atcoder.jp/contests/
#
# lang: Python3 (3.4.3)

import math
import statistics
import numpy as np
import queue

def f(a, b, theta):
  if math.pi / 2.00 - 1e-8 < theta:
    return 0.00
  else:
    if a * math.tan(theta) <= b:
      ret = a * a * b - a * a * a * math.tan(theta) / 2.00
    else:
      ret = b * b  / math.tan(theta) * a / 2.00
    return ret

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

ok = math.pi / 2.00
ng = 0.00
for i in range(100000):
  mid = (ok + ng) / 2.00
  if(f(a, b, mid) < x):
    ok = mid
  else:
    ng = mid
print('{:.8f}'.format(ok / math.pi * 180.00))

Submission status: Accepted

Solution code:
from math import pi, atan

A, B, X = map(float, input().split())
X /= A
if X > 1/2 * A*B:
    theta = atan((A*B - X) / (1/2 * A**2))
else:
    theta = atan(1/2 * B**2 / X)
print(180 / pi * theta)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    import sys
    input = sys.stdin.readline

    import math


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

Submission status: Accepted

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = V - x

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = V - x

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, math.atan(b/a), math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0, math.atan(b/a))

print(math.degrees(result))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
p=0
if x<=a**2*b/2:
  tan=a*b**2/2/x
else:
  tan=2*(b/a-x/a**3)
print(math.degrees(math.atan(tan)))

Submission status: Accepted

Solution code:
import math
a,h,x = [int(j) for j in input().split()]
# y = (h*a - x/a)*(2/a**2)
# y = a**2/(2*h*a-2*x)
y = 2*h/a - 2*x/a**3
z = (h**2)*a/(2*x)
# try:
# print(y)
b = x/(a**2)
if b>h/2:
    print(math.degrees(math.atan(y)))
else:
    print(math.degrees(math.atan(z)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    from math import pi,atan
    a,b,x=map(int,input().split())
    if(2*x<=a*a*b):
        # b*b/tany*1/2*a=x
        # tany=a*b*b/(2*x)
        print(atan(a*b*b/(2*x))*180/pi)
    else:
        # (b+(b-a*tany))*1/2*a*a=x
        # 2*b-a*tany=2*x/(a*a)
        # tany=(2*(b-x/(a*a)))/a
        print(atan((2*(b-x/(a*a)))/a)*180/pi)
resolve()

Submission status: Accepted

Solution code:
import math

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

x /= a
if x<a*b/2:
  # x = a2*b/2
  a2 = x*2/b
  ans = math.atan2(b, a2)
else:
  # x = (b-b2)*a+b2*a/2
  b2 = (a*b-x)*2/a
  ans = math.atan2(b2, a)
print "%.10f"%(ans/math.pi*180)