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 math

a,b,volume=map(int,input().split())
V=a*a*b
space=V-volume
if space>volume:
  high=volume*2/a/b
  print(math.degrees(math.atan(b/high)))
elif space<=volume:
  high2=space*2/a/a
  print(math.degrees(math.atan(high2/a)))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

import math

side, height, volume = [int(i) for i in input().split()]

fullvolume = side * side * height
space_height = (fullvolume - volume) / (side * side)

if volume*2 >= fullvolume:
    print(math.degrees(math.atan(space_height*2 / side)))
else:
    print(math.degrees(math.atan(height / (2*volume/side/height) )))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
import math

a,b,x = map(int,input().split())
taiseki = a*a*b
mizu_height = x / (a*a)
parcent = x/taiseki

if x/taiseki <= 0.5:
    menseki = mizu_height*a
    a = 2 * menseki / b
    #print(a)
    teihen = np.sqrt(a**2+b**2)
    #print(teihen)
    height = 2*menseki/teihen
    #print(height/b)
    print(90-math.degrees(math.asin(height/b)))

else:
    menseki = mizu_height * a
    daikei_hen = 2*menseki/a - b

    sankaku_b = b - daikei_hen

    sankaku_menseki = a*sankaku_b/2
    daikei_menseki = menseki - sankaku_menseki

    sankaku_teihen = np.sqrt(a**2+sankaku_b**2)
    sankaku_height = 2*sankaku_menseki/sankaku_teihen

    daikei_height = daikei_menseki/sankaku_teihen

    height = daikei_height + sankaku_height

    print(90-math.degrees(math.asin(height/b)))

Submission status: Accepted

Solution code:
import math

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

v = (a * a * b)/2

if x >= v:
  print(math.degrees(math.atan(2*(2*v-x)/(a**3))))
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())

if x<=a**2*b/2:
 c=2*x/a/b
 e=c/((b**2+c**2)**(0.5))
 d=math.acos(e)*180/math.pi
else:
 c=2*b-(2*x/a/a)
 e=c/((a**2+c**2)**(0.5))
 d=90-math.acos(e)*180/math.pi
print(d)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
pi=3.1415926535897932
chk=0.0000001
a,b,x=map(int,input().split())
t=a*b/2
s=x/a
if t>s:
    h=[0,a]
    while 1:
        hs=(h[0]+h[1])/2
        w=b*hs/2
        if abs(w-s)<chk:
            break
        elif w>s:
            h[1]=hs
        elif w<s:
            h[0]=hs
    print(90-math.atan(hs/b)*180/pi)
else:
    h=[0,b]
    while 1:
        hs=(h[0]+h[1])/2
        w=(hs+b)*a/2
        if abs(w-s)<chk:
            break
        elif w>s:
            h[1]=hs
        elif w<s:
            h[0]=hs
    print(90-math.atan(a/(b-hs))*180/pi)

Submission status: Accepted

Solution code:
import math


def main():
    s = input().split(" ")
    a = float(s[0])
    b = float(s[1])
    x = float(s[2])
    if(a * a * b / 2 < x):
        print(math.atan(2 * (a * a * b - x) / a / a / a) / math.pi * 180)
    else:
        print(math.atan(a * b * b / 2 / x) / math.pi * 180)


if(__name__ == "__main__"):
    main()

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(int, input().split())
if(x >= 0.5*a*a*b):
  t_theta = (2*b)/a - (2*x)/a**3
  print ((180 * np.arctan(t_theta)) / np.pi)
else:
  t_theta = (a*b*b) / (2*x)
  print ((180 * np.arctan(t_theta)) / np.pi)

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
# 割合
l = x / (a*a*b)
c = b*l
if (b == c):
    print(0)
    exit()
elif(c>=b/2):
    t = a/(b-c)/2
else:
    t = 2*a*c/b**2

print('{:.8f}'.format(90-math.degrees(math.atan(t))))

Submission status: Accepted

Solution code:
import math 
 
side, height, volume = list(map(int, input().split()))
 
fullvolume = side * side * height
space = fullvolume - volume
 
if fullvolume/2 > volume:
  n = (2 * volume) / (side * height)
  
  angle = 90 - math.degrees(math.atan(n/height))
else:
  n = (2 * space) / (side * side)
  angle = math.degrees(math.atan(n/side))
print(angle)

Submission status: Accepted

Solution code:
import math

def main():
    side,high,volume = list(map(int,input().split()))

    fullvolume = side * side * high
    space = fullvolume - volume

    if space < volume:
        prizm_high = space / (side * side / 2)
        angle = math.degrees(math.atan(prizm_high/side))
    else:
        prizm_high = volume / (high * side / 2)
        angle = 90 - math.degrees(math.atan(prizm_high/high))


    print(angle)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

Solution code:
import math
from sys import exit
a,b,x = map(int, input().split())
j = x/a - a * b / 2
if j == 0:
    print(math.degrees(math.atan(b/a)))
elif j > 0:
    ans = (2*x/(a*a) - 2*b) / (-a)
    print(math.degrees(math.atan(ans)))
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(" "))
if x>a**2*b/2:
    V=a**2*b-x
    L=2*V/(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 math
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

a,b,x=LI()

FUL=a*a*b

if x >= FUL*0.5:
    rest = FUL-x
    # rest = a*a*h*0.5
    h = rest / a / a * 2
    print((math.atan(h/a) / (2*math.pi))*360)
else:
    h = x / a / b * 2
    res = 90 - (math.atan(h / b) / (2*math.pi) * 360)
    print(res)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
s = x / a
# (aa * b / 2) * a = x
aa = (2 * x) / (a * b)
if aa <= a:
	theta = math.atan2(b,aa)
else:
	# a * (b - bb) + a * bb / 2 = s
	# a * b - a * bb + a * bb / 2 = s
	# a * b - a * bb / 2 = s
	# bb * a / 2 = a * b - s
	bb = (a * b - s) * 2 / a
	theta = math.atan2(bb,a)
print(math.degrees(theta))

Submission status: Accepted

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

lim = a * b * (1/2) * a

if x > lim:# x = (1/2) * a**2 * (2b - a* tan(c))
  tan_c = 2 *(b - x/(a**2)) / a
  ans = math.atan(tan_c)
else:# x = (1/2) * a * b**2 / tan(c)
  tan_c = a * (b ** 2) / (2 * x)
  ans = math.atan(tan_c)
  
print(math.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import tan, pi
a,b,x = map(int, input().split())
eps = 1e-6

def f(a,b,t):
  if pi/2-t<eps: return 0
  if b*tan(pi/2.-t) < a: return b*b*tan(pi/2.-t)/2.*a
  else: return a*a*b - a*a*tan(t)/2.*a
  
th_p, th_n = pi/2, 0.
for i in range(100000):
  th_m = (th_p + th_n)/2.
  err = f(a,b,th_m) - x
  if err**2 < eps**2: break
  elif err < 0: th_p = th_m
  else: th_n = th_m
print(180/pi*th_m)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

if S <= a*b/2:
    ans = math.atan((b**2)/(2*S))
else:
    S = a*b - S
    ans = math.atan(S*2/(a**2))

ans = ans * 180/math.pi
print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b,x = map(int, input().split())
m = a*a*b
z = math.degrees(math.atan(b / a))

if x >= m / 2:  
  z = ((x*2) / (a*a)) - b
  r = math.degrees(math.atan((b - z) / a))
  print(r)
else:  
  z = (x*2) / (a*b)
  r = 90 - math.degrees(math.atan(z / b))
  print(r)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
from math import degrees, radians, sin, cos

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def bisearch_max(mn, mx, func):
    """ 条件を満たす最大値を見つける二分探索(小数用) """

    ok = mn
    ng = mx
    for _ in range(100):
        mid = (ok+ng) / 2
        if func(mid):
            # 上を探しに行く
            ok = mid
        else:
            # 下を探しに行く
            ng = mid
    return ok

# カップをdig1度傾けた時、溢れるかどうか
def calc1(dig1):
    # 傾けた反対側の角度
    dig2 = 90 - dig1
    if dig2 == 0:
        return False
    # カップの上の先端の低い方の高さ
    h = b * sin(radians(dig2))
    # 溢れるギリギリの水面の横の長さ
    c = b / cos(radians(dig2))
    # 溢れるギリギリの面積
    limit = h * c / 2
    return S <= limit

def calc2(dig1):
    # コップの底を持ち上げる高さ
    h = a * sin(radians(dig1))
    # 溢れるギリギリの水面の横の長さ
    c = a / cos(radians(dig1))
    # 溢れるギリギリの面積(全体 - 上の空間)
    limit = a * b - h * c / 2
    return S <= limit

a, b, x = MAP()

# 体積を面積にしておく
S = x / a
# 量が全体の半分以上か以下で場合分け
if S <= a * b / 2:
    calc = calc1
else:
    calc = calc2
dig = bisearch_max(0, 90, calc)
print(dig)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
a,b,x = list(map(int,input().split()))
from math import atan2,degrees
w = x/a
if w > a * b / 2:
    print(degrees(atan2(2*b - 2*x/a/a,a)))
else:
    print(degrees(atan2(b,2*x/a/b)))

Submission status: Accepted

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

import sys
from math import degrees, radians, sin, cos

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def bisearch_max(mn, mx, func):
    """ 条件を満たす最大値を見つける二分探索(小数用) """

    ok = mn
    ng = mx
    for _ in range(100):
        mid = (ok+ng) / 2
        if func(mid):
            # 上を探しに行く
            ok = mid
        else:
            # 下を探しに行く
            ng = mid
    return ok

a, b, x = MAP()
# 体積を面積にしておく
h = b * (x / (a * a * b))
S = a * h

# コップをdig1度傾けた時、溢れるかどうか
def calc(dig1):
    # コップの底を持ち上げる高さ
    h1 = a * sin(radians(dig1))
    # 傾けた反対側の角度
    dig2 = 90 - dig1
    if dig2 == 0:
        return False
    # カップの上の先端の低い方の高さ
    h2 = b * sin(radians(dig2))
    # 底の高い方よりカップの先端が高い位置にある
    if h2 >= h1:
        # 水面の横の長さ
        d = a / cos(radians(dig1))
        # 下の方の面積(三角形)
        S1 = d * h1 / 2
        # この時点でSのが小さければOK
        if S1 >= S:
            return True
        # 上の方の面積(平行四辺形)
        S2 = S - S1
        # 上の方の水の高さ
        h3 = S2 / d
        # 水面の高さがカップの先端より低ければOK
        return h1 + h3 <= h2
    # 底の高い方よりカップの先端が低い位置にある
    else:
        # 溢れるギリギリの水面の長さ
        e1 = b / cos(radians(dig2))
        # 面積と高さから、実際の水面の長さ
        e2 = S / h2 * 2
        return e2 <= e1

dig = bisearch_max(0, 90, calc)
print(dig)

Submission status: Accepted

Solution code:
from math import *
a, b, x = [float(a) for a in input().split()]
if x / a < a * b / 2:
    ans = atan2(a*b*b, 2*x)
else:
    ans = atan2(2*(a*a*b-x), a**3)

print(ans * 180 / pi)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

if b == h:
    print(0)
    exit()
elif h >= b/2:
    tanth = a / (b - h) / 2
else:
    tanth = 2 * a * h / b**2

theta = math.degrees(math.atan(tanth))
print(90 - theta)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
s = x / a
rad = 0
if s >= a*b / 2:
    h = (a*b-s)*2/a
    rad = math.atan2(h, a)
else:
    w = s*2 / b
    rad = math.atan2(b, w)
deg = rad / (2*math.pi)*360
print('{:.10f}'.format(deg))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
pi=3.1415926535897932
chk=0.0000001
a,b,x=map(int,input().split())
t=a*b/2
s=x/a
if abs(t-s)<chk:
    print(45.0)
elif t>s:
    h=[0,a]
    while 1:
        hs=(h[0]+h[1])/2
        w=b*hs/2
        if abs(w-s)<chk:
            break
        elif w>s:
            h[1]=hs
        elif w<s:
            h[0]=hs
    print(90-math.atan(hs/b)*180/pi)
else:
    h=[0,b]
    while 1:
        hs=(h[0]+h[1])/2
        w=(hs+b)*a/2
        if abs(w-s)<chk:
            break
        elif w>s:
            h[1]=hs
        elif w<s:
            h[0]=hs
    print(90-math.atan(a/(b-hs))*180/pi)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if b == h:
    print(0)
elif h >= b/2:
    tanth = a / (b - h) / 2
    theta = math.degrees(math.atan(tanth))
    print(90 - theta)
else:
    tanth = 2 * a * h / b**2
    theta = math.degrees(math.atan(tanth))
    print(90 - theta)

Submission status: Accepted

Solution code:
import math
PI=3.14159265358979323846
a,b,x=map(int,input().split())
s=x/a
ans=0
a2=0

if s==a*b:
  ans=0
else:
  if s>b*a/2:
    bu=2*s/a-b
    s-=a*bu
    b-=bu
    a2=2*s/b
  else:
    a2=2*s/b
  r=math.atan(b/a2)
  ans=r*(180/PI)
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

from math import atan
from math import degrees

if x >= 0.5 * a * a * b:
  theta = atan(2*(a*a*b - x) / (a**3))
else:
  theta = atan(0.5 * a * b* b / x)
print(degrees(theta))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

# a * b * c / 2 >= x and 0 <= c <= a
c = 2 * x / (a * b)

# (b + d) * a * a / 2 >= x and 0 <= d <= b
d = 2 * x / (a * a) - b

if c <= a:
    deg = 90 - degrees(atan2(c, b))
else:
    deg = degrees(atan2(b - d, a))

print(deg)

Submission status: Accepted

Solution code:
from math import degrees, atan
a, b, x = map(float, input().split())
y = min(x, a * a * b - x)
if y != x:
  print(degrees(atan(2 * y / a / a / a)))
else:
  print(90 - degrees(atan(2 * y / a / b / b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

tan_theta = 2*(b/a-x/math.pow(a, 3))
tan_theta2 = a * pow(b, 2) / (2 * x)

if math.pow(a, 3) / 2 * tan_theta < x:
    theta = math.atan(tan_theta)
else:
    theta = math.atan(tan_theta2)

print(math.degrees(theta))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import sys
from math import atan2, degrees, radians, sqrt, sin, cos

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 7)
INF = 10 ** 18
MOD = 10 ** 9 + 7

def bisearch_max(mn, mx, func):
    """ 条件を満たす最大値を見つける二分探索(小数用) """

    ok = mn
    ng = mx
    for _ in range(100):
        mid = (ok+ng) / 2
        if func(mid):
            # 上を探しに行く
            ok = mid
        else:
            # 下を探しに行く
            ng = mid
    return ok

a, b, x = MAP()
# 体積を面積にしておく
h = b * (x / (a * a * b))
S = a * h

# コップの底をh1の高さにした時、溢れるかどうか
def calc(h1):
    # 傾けた下の地面の長さ
    c = sqrt(a**2 - h1**2)
    # 傾けた角度
    dig1 = degrees(atan2(h1, c))
    # 傾けた反対側の角度
    dig2 = 90 - dig1
    if dig2 == 0:
        return False
    # カップの上の先端の低い方の高さ
    h2 = b * sin(radians(dig2))
    # 底の高い方よりカップの先端が高い位置にある
    if h2 >= h1:
        # 水面の横の長さ
        d = a / cos(radians(dig1))
        # 下の方の面積
        S1 = d * h1 / 2
        # この時点でSのが小さければOK
        if S1 >= S:
            return True
        # 上の方の面積
        S2 = S - S1
        # 上の方の水の高さ
        h3 = S2 / d
        # 水面の高さがカップの先端より低ければOK
        return h1 + h3 <= h2
    # 底の高い方よりカップの先端が低い位置にある
    else:
        # 溢れるギリギリの水面の長さ
        e1 = b / cos(radians(dig2))
        # 面積と高さから、実際の水面の長さ
        e2 = S / h2 * 2
        return e2 <= e1

h = bisearch_max(0, a, calc)
w = sqrt(a**2 - h**2)
print(degrees(atan2(h, w)))

Submission status: Accepted

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

s = x / a
height = s / a

if height * 2 > b:
  print(math.degrees(math.atan((b-height)/(a*0.5))))

else:
  tall = s*2/b
  print(math.degrees(math.atan(b/tall)))

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
h = x/a/a
area = h*a
aa = area*2/b
tan = b/aa
deg = math.degrees(math.atan(tan))

area2 = a*b-area
bbb =area2*2/a
tan2 = bbb/a
deg2 = math.degrees(math.atan(tan2))

deg_s = math.degrees(math.atan(b/a))

if deg<deg_s and deg2<deg_s:
  print(min((deg,deg2)))
elif deg>=deg_s:
  print(deg)
else:
  print(deg2)

Submission status: Accepted

Solution code:
# 2019/10/29
import math

a,b,x=map(int,input().split())
r=(pow(a,2)*b-(2*x))/(a*b)
pi=math.pi

if r>=0:
    ans=math.atan2(b,a-r)
else:
    t=2*(b-(x/pow(a,2)))
    ans=math.atan2(t,a)

print(math.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi
 
a, b, x = [float(x) for x in input().split()]
 
v = a * a * b
 
if v / 2 < x:
    t = atan(2 * (v - x) / (a * a * a))
else:
    # t = atan(v / 2 / x)
    t = pi / 2 - atan(2 * x / (a * b * b))
 
print(t * 180.0 / pi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

# 半分より少ない場合

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



if x < a**2 * b * 0.5:

    rad = math.atan2(b, (2*x)/(a*b))

    dig = rad / math.pi * 180

    print(dig)

#半分より多い場合
else:
    
    rad = math.atan2(a, (2*(a*a*b - x))/(a*a))

    dig = 90 - rad / math.pi * 180

    print(dig)

Submission status: Accepted

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    y = a - ((2 * x) / (a * b))
    degree = math.degrees(math.atan((a - y) / b))
    res = 90 - degree
elif half_bootle_volume < x:
    y = ((2 * x) / (a ** 2)) - b
    if y == b:
        res = 0
    else:
        degree = math.degrees(math.atan(a / (b - y)))
        res = 90 - degree

print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC144D - Water Bottle
from math import atan, degrees


def main():
    A, B, X = map(int, input().split())
    if A ** 2 * B >= 2 * X:
        C = 2 * X / (A * B)
        ans = degrees(atan(B / C))
    else:
        C = 2 * (B - (X / A ** 2))
        ans = degrees(atan(C / A))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

s = x / a

if s == a * b:
    print(0)
else:
    if s > b * a / 2:
        bu = 2 * s / a - b
        s -= a * bu
        b -= bu
        a2 = 2 * s / b
    else:
        a2 = 2 * s / b

    rad = math.atan(b/a2)
    print(rad*(180/math.pi))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
a, b, x = map(int, input().split())
if x <= a*a*b/2: print(90 - math.degrees(math.atan(2*x/(a*b*b))))
elif x == a*a*b: print('0')
else: print(90 - math.degrees(math.atan(a**3/(2*(a*a*b-x)))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import *

EPS = 1e-9

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

if fabs(x - half) < EPS:
    ans = 45
elif x - half < EPS:
    c = 2 * x / b
    ans = degrees(atan(b / c))
elif x - half > EPS:
    c = 2 * x / a - b
    ans = degrees(atan((b - c) / a))

print(ans)

Submission status: Accepted

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

if x < a*a*b/2:
    tan = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan))
    print(90-deg)
elif x == a*a*b:
    print(0)
else:
    i = a**3
    j = 2*(a*a*b-x)
    tan = i/j
    deg = math.degrees(math.atan(tan))
    print(90-deg)

Submission status: Accepted

Solution code:
from enum import Enum
from queue import Queue

import numpy as np

import collections
import bisect
import sys
import math

from scipy.sparse.csgraph import floyd_warshall

BIG_NUM = 200000000000
MOD = 1000000007
EPS = 0.000000001
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:
#144d
import math
a,b,x = map(int, input().split())


#底が見えるか否か(こぼれるときに断面が三角形か台形か)を確認する
if x <= b*a/2*a: #三角形
    c = 2*x / (a*b) #こぼれるときの三角形の高さ
    print(math.atan(b/c)*180/math.pi)
else: #台形
    c = 2*x/(a*a) -b #こぼれるときの台形上辺
    print(math.atan((b-c)/a)*180/math.pi)

Submission status: Accepted

Solution code:
import math

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

if x >= a**2 * b / 2:
    print(math.degrees(math.atan2((2*b - (2*x/(a**2))), 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())
s = x / a
if s <= a*b/2:
  print(math.atan(b/(2*s/b))*180/math.pi)
else:
  print(math.atan(2*(a*b-s)/a**2)*180/math.pi)

Submission status: Accepted

Solution code:
from math import atan,atan2,degrees

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

# 半分より多いとき
if a * a * b / 2 < x:
  print(degrees(atan(2*b/a -2*x/(a*a*a))))
else:
  # 半分より少ないとき
  print(90-degrees(atan(2*x/(a*b*b))))