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
from operator import itemgetter
import math

sys.setrecursionlimit(10**9)
input = sys.stdin.readline

def ii(): return int(input())
def mi(): return map(int, input().split())
def lmi(): return list(map(int, input().split()))
def lmif(n): return [list(map(int, input().split())) for _ in range(n)]
def ss(): return input().split()

def main():

    a, b, x = mi()
    V = a**2 * b

    if V // 2 < x:
        X = 2*x / a**2 - b
        Y = b - X
        ans = math.degrees(math.asin(Y/math.sqrt(a**2 + Y**2)))
    else:
        X = 2*x / (a*b)
        ans = math.degrees(math.asin(b/math.sqrt(X**2 + b**2)))

    print(ans)

    return

main()

Submission status: Accepted

Solution code:
import math

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

if T//2 < x:
  X= 2*x/a**2 - b
  Y= b - X
  print(math.degrees(math.asin(Y/math.sqrt(a**2+Y**2))))
else:
  X= 2*x/(a*b)
  print(math.degrees(math.asin(b/math.sqrt(X**2+b**2))))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import sys
from collections import deque
from decimal import Decimal
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    a,b,x = IL()
    v = a*a*b
    if v/2<=x:
        ang = math.atan((v-x)*2/a**3)
    else:
        ang = math.atan(a*b*b/2/x)
    print(math.degrees(ang))
    return

if __name__=='__main__':
    Main()

Submission status: Accepted

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

from math import pi, tan, radians
# import math
l = 0
r = 180

for i in range(200000):
    
    m = (l+r)/2
    
    if b * tan(radians(180.0/2-m)) <= a:
        d = b * tan(radians(180.0/2-m)) * b * a / 2
    else:
        d = b*a*a - tan(radians(m))*a*a*a/2
    
    if d == x:
        print(m)
        exit(0)
    elif d > x:
        l = m
    else:
        r = m

print(m)

Submission status: Accepted

Solution code:
A,B,X = map(int,input().split())
from math import atan2, degrees, radians, tan

b = degrees(atan2(B,A))

def is_ok(d):
    if d > b:
        h = B * tan(radians(90-d))
        return X <= A*B*h/2
    else:
        h = B - A * tan(radians(d))
        return X <= A*A*(h+B)/2
ok = 0
ng = 90
for _ in range(100):
    m = (ok+ng)/2
    if is_ok(m):
        ok = m
    else:
        ng = m
print(ok)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

from math import atan2, degrees
a, b, x = mapint()
if x<=a*a*b/2:
    leng = x/b/a*2
    s = atan2(b, leng)
    print(degrees(s))
else:
    x = a*a*b-x
    leng = x/a/a*2
    s = atan2(a, leng)
    print(90-degrees(s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

import math
S = x/a

if S > (a*b)/2:
    c = (2*S)/a - b
    out = math.degrees(math.atan((b-c)/a))
else:
    c = (2*S)/b
    out = math.degrees(math.atan(b/c))

print(out)

Submission status: Accepted

Solution code:
import sys
#import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
a,b,x = rl()
if x<=a*a*b/2:

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m


EPS = 0.0000000001


def f(a, b, theta):
    if theta > m.pi/2 - EPS:
        return 0
    if a * m.tan(theta) <= b:
        ret = a * a * b - a * a * a * m.tan(theta) / 2
    else:
        ret = b * b / m.tan(theta) * a / 2
    return ret


def solve():
    a, b, x = map(int, input().split())
    ok = m.pi / 2
    ng = 0
    
    for _ in range(100):
        mid = (ok + ng) / 2
        if f(a, b, mid) < x:
            ok = mid
        else:
            ng = mid
    print(ok * 180 / m.pi)


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m


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

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

elif x >= b * a**2 / 2:
    y = 2 * (b - x / (a**2))
    print(90 - m.atan(a / y) * 180 / m.pi)
else:
    y = 2 * x / (a * b)
    print(90 - m.atan(y / b) * 180 / m.pi)

Submission status: Accepted

Solution code:
import math
from math import degrees
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


a, b, x = LI()
x /= a
# 水が容器の半分より多い
if x >= a * b / 2:
    # 水のない部分の大きさ = a * (bの水がない部分 = c) / 2 より c部分が求まり tan(theta)が求められる
    tan = 2 * (a * b - x) / a ** 2
    theta = math.atan(tan)
    deg = math.degrees(theta)
# 水が容器の半分より少ない
else:
    tan = b ** 2 / (2 * x)
    theta = math.atan(tan)
    deg = math.degrees(theta)
print(deg)

Submission status: Accepted

Solution code:
import bisect as bs
import math as m
a,b,x = map(int,input().split())
l = 0
r = m.pi/2
for _ in range(10000):
    s = (l+r)/2
    ts = m.tan(s)
    if a*ts < b:
        boundary = a*a*b-a*a*a*ts/2
        if x > boundary:
            r = s
        else:
            l = s
    else:
        boundary = a*b*b/(ts*2)
        if x > boundary:
            r = s
        else:
            l = s
print(l*180/m.pi)

Submission status: Accepted

Solution code:
#かつてAC

import math

def culc(t):
    return math.degrees(math.atan(t))

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

if x>=V/2:
    T=2*((b/a)-(x/(a**3)))
    print(culc(T))
else:
    T=(a*(b**2))/(2*x)
    print(culc(T))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

volume = a*a*b

import math
# 半分以下
if 2 * x <= volume:
    print(90 - math.degrees(math.atan(2*(x/b/a)/b)))
else:
    print(math.degrees(math.atan(2*(volume-x)/a/a/a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
from math import atan, degrees

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    a, b, x = map(int, readline().split())

    if x > a * a * b / 2:
        ans = atan(2 * (a * a * b - x) / (a ** 3))
    else:
        ans = atan(a * b * b / (2 * x))

    print(degrees(ans))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

print(math.degrees(rad))

Submission status: Accepted

Solution code:
import math

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

if 2 *x <= a ** 2 * b:
    p1 = a * b ** 2
    p2 = 2 * x
else:
    p1 = 2 * (a ** 2 * b - x)
    p2 = a ** 3

sit = math.atan(p1 / p2)
print(math.degrees(sit))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

Submission status: Accepted

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

if (a*a*b/2<=x):
  if (a*a*b==x):
    print(0)
  else:
    theta=math.atan((a*a*a)/(2*(a*a*b-x)))
    print(90.0-theta*180.0/math.pi)
else:
  theta=math.atan(2*x/(a*b*b))
  print((math.pi/2-theta)*180.0/math.pi)

Submission status: Accepted

Solution code:
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, x = map(int, readline().split())
    if a*a*b/2 < x:
        tan = 2 * b / a - 2 * x / (a ** 3)
        ans = math.degrees(math.atan(tan))
        print(ans)
    else:
        tan = a * b * b / x / 2
        ans = math.degrees(math.atan(tan))
        print(ans)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d

import sys
from math import atan,pi
input=sys.stdin.readline

def main():
    a,b,x=map(int,input().split())
    if 2*x>=b*a**2:
        print(atan((2*(a**2*b-x))/a**3)*180/pi)
    else:
        print(atan(b**2*a/(2*x))*180/pi)
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

if V / 2 <=  x:
    y = a ** 2 * b - x
    s = 2 * y / a ** 3

else:
    s = a * b ** 2 / (2 * x)

#print(s)
ans = math.atan(s)
ans = math.degrees(ans)

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
import math

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

tan = (2*((a**2)*b-x))/a**3

if x <= (a**3)*tan/2:
    tan = (a*(b**2))/(x*2)

deg = math.degrees(math.atan(tan))
print(deg)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

tr = a*a*b/2

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

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

Submission status: Accepted

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

bottle=(a**2)*b
#空間が三角柱か四角柱の境目の時の角度r
r=b/a

theta=2*(bottle-x)/(a**3)
theta=math.degrees(math.atan(theta))

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

Submission status: Accepted

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

import math

d = x/(a**2)

c = b-d
e = c*2
if e<=b:
    f = (e**2+a**2)**(1/2)
    g = (f**2+a**2-e**2)/(2*f*a)
    print(math.degrees(math.acos(g)))
else:
    e = 2*x/(a*b)
    #print(e)
    a = b
    f = (e**2+a**2)**(1/2)
    g = (f**2+a**2-e**2)/(2*f*a)
    print(90-(math.degrees(math.acos(g))))

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
import math
# 0025~
# xがa*a*bの半分仮想で内科で場合分け.片側が常に限界まで水があるので
# 右へ右へと傾けていくことを考えている
maxL = a*a*b
# 半分より大きい場合．すなわち左側の水線がどんどん落ちていく場合，
rest = maxL -x
if rest <= maxL / 2:
    # 半分の容量に対してどれだけ減ったかを調べる
    dropped = (rest / (maxL/2)) * b
    # 傾けた角度は，dropped, a, の辺を持った直角三角形の角度tan-1(dropped/a)となる.
    theta = math.atan(dropped/a) / math.pi * 180.0
    print(abs(theta))
    exit()

# 半分より小さい場合，すなわち水線が底面の左から落ちていく場合
# 作られる削ってくる三角形
#rest = (maxL/2)-x
#dropped = rest /(maxL/2)
# ああ逆でいいのか
h = a * (x/(maxL/2))
theta2 = math.atan(h/b)/math.pi * 180.0
theta1 = math.atan(b/a)/math.pi * 180.0
# 更に傾けた角度は，(180-theta1) - theta2
print(theta1 + (90-theta1)-theta2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a,b,c=mi()
h=c/(a**2)
if h>b/2:
  print(math.degrees(math.atan(2*(b-h)/a)))
else:
  print(90-math.degrees(math.atan(2*c/(a*b*b))))

Submission status: Accepted

Solution code:
import math
a, b, k = list(map(int, input().split(' ')))
if k > a*a*b / 2:
    p = 2*b - 2*k / (a*a)
    q = (p**2 +a**2) ** 0.5
    limit = p
else:
    p = 2*k/(a*b)
    q = (p**2 +b**2) ** 0.5
    limit = b

left = 0.0
right = 90.0
while right > left + 1e-12:
    r = (left + right) / 2.0
    if q * math.sin(math.radians(r)) < limit:
        left = r
    else:
        right = r

print(r)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import math

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

b_w = x / (a * a)

x1 = 2 * b_w - b

if x1 >= 0:
    print(math.atan((b - x1) / a) / (2*math.pi) * 360)
else:
    print(math.atan(b * a * b / x / 2) / (2*math.pi) * 360)

Submission status: Accepted

Solution code:
import math
a, b, k = list(map(int, input().split(' ')))
if k > a*a*b / 2:
    # k = a*a*b - a*a*p/2 | pは斜めの水の内側の高さの方の辺, p = b で丁度半分
    # p = 2b - 2k/(a*a)
    p = 2*b - 2*k / (a*a)
    # 三角形の長い方をqとして qq = pp + aa
    q = (p**2 +a**2) ** 0.5
    
    # q * sin(r) = p
    # r = ... わからんので 2分探索
    left = 0.0
    right = 90.0
    while right > left + 1e-12:
        r = (left + right) / 2.0
        if q * math.sin(math.radians(r)) < p:
            left = r
        else:
            right = r
else:
    # k = a*b*p/2
    # p = 2*k/(a*a)
    p = 2*k/(a*b)
    # 三角形の長い方をqとして qq = pp + aa
    q = (p**2 +b**2) ** 0.5
    # r = ... わからんので 2分探索
    left = 0.0
    right = 90.0
    while right > left + 1e-12:
        r = (left + right) / 2.0
        if q * math.sin(math.radians(r)) < b:
            left = r
        else:
            right = r
print(r)

Submission status: Accepted

Solution code:
import math

a, b, x = map(float, input().split())
if a * a * b <= x * 2:
    h = 2 * (b - x / a / a)
    ret = math.degrees(math.atan2(h, a))
else:
    h = 2 * x / a / b
    ret = 90 - math.degrees(math.atan2(h, b))
print(ret)

Submission status: Accepted

Solution code:
import math
import os
import sys
import unittest
from io import StringIO

# 検索用タグ、3次元->2次元で解く。次元を落とす。、直角三角形、2辺の長さから角度を求める(アークタンジェント、atan())
# 参考：https://drken1215.hatenablog.com/entry/2020/04/26/193500

# 再帰処理上限(dfs作成時に設定するのが面倒なので限度近い値を組み込む)
sys.setrecursionlimit(999999999)


# 実装を行う関数
def resolve():
    # 数値取得サンプル
    #   1行N項目 x, y = map(int, input().split())
    #   N行N項目 x = [list(map(int, input().split())) for i in range(n)]

    # 文字取得サンプル
    #   1行1項目 x = input()
    a, b, x = map(int, input().split())
    x = x / a

    # 45度以上傾けるかどうか(xが全体の半分以下なら、45度以上、傾けられるはず)
    water_ratio = x / (a * b)

    # 答えを求める
    if water_ratio > 0.5:
        rad = math.atan2(a, 2 * (a * b - x) / a)
        ans = 90 - math.degrees(rad)

    else:
        rad = math.atan2(2 * x / b, b)
        ans = 90 - math.degrees(rad)

    print(ans)


# テストクラス
class TestClass(unittest.TestCase):
    def assertIO(self, assert_input, output):
        stdout, sat_in = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(assert_input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, sat_in
        self.assertEqual(out, output)

    def test_input_1(self):
        test_input = """2 2 4"""
        output = """45.0000000000"""
        self.assertIO(test_input, output)

    def test_input_2(self):
        test_input = """12 21 10"""
        output = """89.7834636934"""
        self.assertIO(test_input, output)

    def test_input_3(self):
        test_input = """3 1 8"""
        output = """4.2363947991"""
        self.assertIO(test_input, output)

    # 自作テストパターンのひな形(利用時は「tes_t」のアンダーバーを削除すること
    def tes_t_1original_1(self):
        test_input = """データ"""
        output = """データ"""
        self.assertIO(test_input, output)


# 実装orテストの呼び出し
if __name__ == "__main__":
    if os.environ.get("USERNAME") is None:
        # AtCoder提出時の場合
        resolve()

    else:
        # 自PCの場合
        unittest.main()

Submission status: Accepted

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

Submission status: Accepted

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

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

degree = math.degrees(theta)
print(degree)

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d

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

# 高さ
y = x / (a ** 2)

if y >= ((1 / 2) * b):
    d = math.atan2(2 * (y * a - a * b), a ** 2)

    # dを度数法単位に変換
    d_deg = math.degrees(d)

    print(abs(d_deg))

else:
    d = math.atan2((1 / 2) * (b ** 2), y * a)

    # dを度数法単位に変換
    d_deg = math.degrees(d)

    print(abs(d_deg))

Submission status: Accepted

Solution code:
import math

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

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

print(theta * 360 / (2 * math.pi))

Submission status: Accepted

Solution code:
import math

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

if x == (a**2)*b:
    ans = 90
elif x == (a**2)*b/2:
    ans = 45
elif x < (a**2)*b/2:
    rad = math.atan(2*x/(a*b**2))
    ans = math.degrees(rad)
else:
    rad = math.atan(a**3/(2*a**2*b - 2*x))
    ans = math.degrees(rad)
print(90-ans)

Submission status: Accepted

Solution code:
import sys
from math import atan, degrees

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


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

    print(degrees(ans))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

a,b,x = (int(a) for a in input().split())
if 2 * x <= a**2 * b :
    t = b
    s = 2 * x / (a*b)
    r = s / t
    print(90 - math.degrees(math.atan(r)))
else : 
    t = a
    s = 2 * b - 2 * x / (a ** 2)
    r = s / t
    print(math.degrees(math.atan(r)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(int,input().split())
th = a**2 * b / 2
if x <= th:
    ans = np.arctan(a*b**2/2/x)
else:
    ans = np.arctan((2*b-2*x/a**2)/a)
print(np.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import itertools
# import numpy as np
import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

v = a * a * b
s = x / a

if x == v:
    print(0)
    exit()

if x <= v / 2:
    # print(math.degrees(math.atan(2 * s / b / b)))
    print(90 - math.degrees(math.atan(2 * x / a / b / b)))
else:
    print(90 - math.degrees(math.atan(a / (b - (2 * s / a - b)))))

Submission status: Accepted

Solution code:
import numpy as np

a,b,x = input().split()
a = int(a)
b = int(b)
x = int(x)
ans = 0
if 2*x/(a**2) < b:
  l = 2*x/(a*b)
  ans = np.arctan(l/b)
else:
  l = 2 * (b - x/(a**2))
  if l == 0:
    ans = np.pi/2
  else:
    ans = np.arctan(a/l)

ans = 90 - np.rad2deg(ans)
print('{:.10f}'.format(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((2*(b-x/(a**2))/a))))
else:
    print(math.degrees(math.atan((a*(b**2))/(2*x))))

Submission status: Accepted

Solution code:
import math
def at(x):
    return math.degrees(math.atan(x))

a, b, x = map(int, input().split())
print(at(a*b*b/(2*x)) if 2*x < a*a*b else at(2*(a*a*b-x)/(a**3)))

Submission status: Accepted

Solution code:
import math

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

if x/(a*a*b) <= 0.5: #水が水筒の半分以下の場合
    area = x/a
    tan = area*2/(b*b)
    d = 90 - math.degrees(math.atan(tan))
else:
    rest = (a*a*b - x)/a
    tan = rest*2/(a*a) #空の部分の面積は、a*atanθ/2 = a*a*b - x
    d = math.degrees(math.atan(tan))

print(d)

Submission status: Accepted

Solution code:
import math

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

if x/(a*a*b) <= 0.5: #水が水筒の半分以下の場合
    h = x/a/b*2
    hy2 = (h*h + b*b)
    cosa = (hy2 + b*b - h*h )/(2*(hy2**0.5)*b)
    d = 180 - math.degrees(math.acos(cosa)) - 90
else:
    rest = (a*a*b - x)/a
    tan = rest*2/(a*a) #空の部分の面積は、a*atanθ/2 = a*a*b - x
    d = math.degrees(math.atan(tan))

print(d)

Submission status: Accepted

Solution code:
import math

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

half = a*a*b/2
if half == x:
    print(45)
elif half > x:
    print(math.degrees(math.atan(a*b*b/(x*2))))
else:
    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(' '))

base = a * a * b /2

if int(base) == x:
    print(math.degrees(math.atan(b/a)))
elif base > x:
    ah = 2 * x / (a * b)
    print(math.degrees(math.atan(b/ah)))
else:
    bh = 2 * x / a ** 2 - b
    c = b - bh
    print(math.degrees(math.atan(c/a)))

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial
import heapq, bisect
import math
import itertools
import queue
from collections import deque
from fractions import Fraction


def get_max(a, b, theta):
    kari = b * math.tan(math.radians(90 - theta))
    if kari > a:
        S = (a * b) - (a * (a * math.tan(math.radians(theta))) / 2)
    else:
        S = (kari * b) / 2
    max_water = S * a
    return max_water




def main():
    a, b, x = map(int, input().split())
    left, right = 0, 90

    for i in range(10000):
        half = (left + right) / 2
        max_water = get_max(a, b, half)
        if max_water >=x:
            left = half
        else:
            right = half

    print(left)





if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

def to_deg(theta):
    return theta * 180 / math.pi

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

print(to_deg(theta))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(math.degrees(math.atan(temp)))

Submission status: Accepted

Solution code:
import math
from decimal import Decimal
A,B,X = map(Decimal, input().split())
s = X / A

if s == A*B:
    print(0)
    exit()
if s > A * B / 2:
    Bu = 2 * s / A - B
    s -= A*Bu
    B -= Bu

A2 = 2 * s / B
print(math.degrees(math.atan(B/(A2))))

Submission status: Accepted

Solution code:
a,b,x=list(map(int,input().split()))
import math
import sys
if a*a*b==x:
  print(0.0000000000)
  sys.exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

tan = (a*a*a)/(2*(a*a*b-x))
tan_thre = a/b

if tan > tan_thre:
    ans = math.degrees(math.atan(tan))
    print(90-ans)
else:
    tan = 2*x/(a*b*b)
    ans = math.degrees(math.atan(tan))
    print(90-ans)

Submission status: Accepted

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

y = x/a

if y <= (a*b)/2:
    print(90-math.degrees(math.atan((2*y)/pow(b,2))))
else:
    y = a*b - y
    print(math.degrees(math.atan((2*y)/pow(a,2))))