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, x = map(int, input().split())
if x <= a * a * b / 2:
    t = 2 * x / a / b
    theta = math.atan2(b, t) / math.pi * 180
else:
    y = a * a * b - x
    t = 2 * y / a / a
    theta = math.atan2(t, a) / math.pi * 180
print(theta)

Submission status: Accepted

Solution code:
import math

a,b,x = [int(i) for i in input().split()]
s = x / a
if s<=a*b/2:
    print(math.atan(b**2/(2*s))/math.pi*180)
else:
    print(math.atan(2*(a*b-s)/(a**2))/math.pi*180)

Submission status: Accepted

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

Submission status: Accepted

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

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

bottle = (A ** 2) * B
x = -1
y = -1
import math
area = X / A
if X < bottle / 2:
  y = (X * 2 / B) / A
  x = B
  print(90 - math.degrees(math.atan(y/x)))
else:
  x = (bottle - X) * 2 / (A ** 2)
  y = A
  if x == 0:
    print(0)
  else:
    print(90 - math.degrees(math.atan(y/x)))

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from decimal import Decimal
import math

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

if a * a * b > 2 * x:
    tri = x / a
    c = tri * Decimal(2) / b
    d = (c ** 2 + b ** 2) ** Decimal("0.5")
    cos_a = (b ** 2 + d ** 2 - c ** 2) / (2*b*d)
    print(90 - math.degrees(math.acos(cos_a)))
else:
    tri = (a * a * b - x) / a
    e = tri * Decimal(2) / a
    f = (a ** 2 + e ** 2) ** Decimal("0.5")
    cos_e = (f ** 2 + a ** 2 - e ** 2) / (2*f*a)
    print(math.degrees(math.acos(cos_e)))
#print(cosin)

Submission status: Accepted

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

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(2*(b-x/(a**2))/a)))
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())
maxx = a * a * b
ans_rad = 0
if x + x <= maxx:
    c = 2 * x / (a * b)
    ans_rad = math.atan(b / c)
else:
    y = maxx - x
    c = 2 * y / (a * a)
    ans_rad = math.atan(c / a)

ans = math.degrees(ans_rad)
print(ans)

Submission status: Accepted

Solution code:
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
#
#
# @stop_watch
def solve(a, b, x):
    import math
    LOOP = 100
    water_max = a ** 2 * b
    area_x = x / a
    half_angle = math.degrees(math.acos(a / math.sqrt(a ** 2 + b ** 2)))
    ans = 0
    if x > water_max / 2:
        top = half_angle
        btm = 0
        for _ in range(LOOP):
            ans = (top + btm) / 2
            angle_a = 90 - ans
            angle_b = ans
            angle_c = 90
            side_a = a  # ★
            side_c = a / math.cos(math.radians(angle_b))
            side_b = side_c * math.sin(math.radians(angle_b))  # ★
            area = side_a * side_b / 2 + side_a * (b - side_b)
            if area >= area_x:
                btm = ans
            else:
                top = ans
    else:
        top = 90
        btm = half_angle
        for _ in range(LOOP):
            ans = (top + btm) / 2
            angle_a = 90 - ans
            angle_b = ans
            angle_c = 90
            side_b = b  # ★
            side_c = b / math.sin(math.radians(angle_b))
            side_a = side_c * math.cos(math.radians(angle_b))  # ★
            area = side_a * side_b / 2
            if area >= area_x:
                btm = ans
            else:
                top = ans

    print(ans)


if __name__ == '__main__':
    # S = input()
    # N = int(input())
    a, b, x = map(int, input().split())
    # As = [int(i) for i in input().split()]
    # Bs = [int(i) for i in input().split()]
    solve(a, b, x)

Submission status: Accepted

Solution code:

from math import atan, sqrt, degrees

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

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import math

def cin():
    in_ = list(map(int,input().split()))
    if len(in_) == 1:  return in_[0]
    else:  return in_

a, b, x = cin()
if a * a * b == x:  print(0)
else:
    if 2 * x <= a ** 2 * b:
        p = 2 * x / (a * b)
        print(math.degrees(math.atan(b / p)))
    else:
        S = x / a
        p = 2 * (a * b - S) / a
        print(90 - math.degrees(math.atan(a / p)))

Submission status: Accepted

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

check = a*a*b/2

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

Submission status: Accepted

Solution code:
from math import atan2, degrees

A, B, X = map(int, input().split())
if A ** 2 * B > X * 2:
    width = X * 2 / (A * B)
    print(degrees(atan2(B, width)))
else:
    height = (A ** 2 * B - X) * 2 / (A ** 2)
    print(degrees(atan2(height, A)))

Submission status: Accepted

Solution code:
import math

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

h1 = b - x/a/a
h2 = 2*x/(a*b)


if x == a*a*b:
    print(0)
elif b*a*a/2 <= x:
    radians = math.atan(a/2/h1)
    print(90 - math.degrees(radians))
else:
    radians = math.atan(h2/b)
    print(90 - math.degrees(radians))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from math import atan,pi
A,B,X=map(int,input().split())

if 2*X>=A*A*B:
    P=atan(2*(A*A*B-X)/(A*A*A))*180/pi
    print(P)
else:
    Q=atan((A*B*B)/(2*X))*180/pi
    print(Q)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

# 水が多いか少ないかで作図が変わってくる

# 半分以上水が入っている場合
if x >= a**2 * b / 2:
    # 限界の時、a**2 * b - 0.5 * a**2 * tanθ * a = x
    tan = 2 * (a**2 * b - x) / a**3
    ans = math.degrees(math.atan(tan))
    print(ans)

# 半分以下の場合
else:
    # 限界の時、0.5 * b**2 * tan(90 - θ) * a = x
    # tan(90 - θ) = 1/tanθ
    tan = (a * b**2) / (2 * x)
    ans = math.degrees(math.atan(tan))
    print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from math import degrees, atan

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[2]:


import math


# In[10]:


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


# In[13]:


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


# In[ ]:

Submission status: Accepted

Solution code:
def binary_search(ok, ng, error, test):
    """
    :param ok: solve(x) = True を必ず満たす点
    :param ng: solve(x) = False を必ず満たす点
    """
    while abs(ok - ng) > error:
        mid = (ok + ng) / 2
        if test(mid):
            ok = mid
        else:
            ng = mid
    return ok

def max2(x,y):
    return x if x > y else y

def min2(x,y):
    return x if x < y else y

def test(y):
    return (a**3*tan(y)/2 + (b-a*tan(y))*cos(y)*a**2/cos(y) if b-a*tan(y) >= 0 else b**2*a*tan(pi/2-y)/2 ) >= x

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


print(binary_search(0,pi/2,10**(-8), test)*180/pi)

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(float, input().split()))
if x <= 0.5 * a * a * b:
    res = math.degrees(math.atan(2 * x / (a * b * b)))
elif x < a * a * b:
    res = math.degrees(math.atan(a / (2 * (b - x / a ** 2))))
else:
    res = 90.0
print(f'{90 - res:.7f}')

Submission status: Accepted

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

y = math.atan((a*(b**2))/(2*x))

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

Submission status: Accepted

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


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


if __name__ == "__main__":
    main()

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 * B / A - 2 * X / A ** 3)))
else:
    print(math.degrees(math.atan(A * B * B / (2 * X))))

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d
from math import radians, sin, cos, tan, degrees, atan
a, b, x = map(int, input().split())

# ans = a * b * (b * tan(radians(45))) / 2
# print(ans, tan(radians(45)))
# x = a * b * (b * tan(radians(ans))) / 2
# 2 * x / (a * b) = (b * tan(radians(ans)))
# 2 * x / (a * b) / b = tan(radians(ans))

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

Submission status: Accepted

Solution code:
import math

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

if x > v/2:
    y = 2*(b-(x/(a*a)))
    naname = math.sqrt((y*y) + (a*a))
    cosine = a/naname
    print(math.degrees(math.acos(cosine)))
elif x < v/2:
    y = 2*x/(b*a)
    naname = math.sqrt((y*y)+(b*b))
    cosine = b / naname
    print(90-math.degrees(math.acos(cosine)))
else:
    naname = math.sqrt((a*a)+(b*b))
    cosine = a/naname
    print(math.degrees(math.acos(cosine)))

Submission status: Accepted

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

t = False
volume = a*a*b
if x <= volume/2:
  t = True
  
if t:
  tan = a*(b**2)/(2*x)
else:
  tan = 2*((a**2)*b - x)/a**3
    
print(math.degrees(math.atan(tan)))

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


a,b,x = list(map(int, input().split()))
import math
if x*2>=a*a*b:
    the = (a*b - x/a) / (0.5*a*a)
else:
    the = (b*b*a) / (2*x)
ans = math.atan(the)
print(ans*180/math.pi)

Submission status: Accepted

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

t = False
volume = a*a*b
if x <= volume/2:
  t = True
  
if t:
  tan = a*(b**2)/(2*x)
else:
  tan = 2*((a**2)*b - x)/a**3
    
print(math.degrees(math.atan(tan)))

Submission status: Accepted

Solution code:
import math

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

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

'''
left = 0
right = math.pi / 2
for i in range(10**5):
    mid = (left + right) / 2
    water = b * b * math.tan(math.pi / 2 - mid) * 0.5 * a
    if water > x:
        left = mid
    elif water < x:
        right = mid
    else: break
print(i, water, x)
print(math.degrees(mid))
'''

Submission status: Accepted

Solution code:
from math import *

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

areatotal = a*a*b

if areatotal / 2 == x: print(45.0)
elif x > areatotal/2:
    left = 0.0
    right = 90.0
    while right-left > 0.00000001:
        current = (right+left)/2
        if a**2 * tan(radians(current)) / 2 * a < (areatotal - x):
            left = current
        else:
            right = current
    print(left)
else:
    left = 0.0
    right = 90.0
    while right-left > 0.00000001:
        current = (right+left)/2
        if b**2 * tan(radians(90-current))/2*a > x:
            left = current
        else:
            right = current
    print(left)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    import math
    a, b, x = [int(item) for item in input().split()]

    s = x/a

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

menseki = a * a
V = menseki * b

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

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

Submission status: Accepted

Solution code:
from math import tan,radians
a,b,w=map(int,input().split())
V=a**2*b
def taiseki(x,a,b):
    x=90-x
    if tan(radians(x))>a/b:
        x=90-x
        return V-(a**3*tan(radians(x)))/2
    else:
        return a*b**2*tan(radians(x))/2
if V==w:
    print(0)
    exit()
ok,ng=0,90
while ng-ok>0.00000001:
    mid=(ok+ng)/2
    if taiseki(mid,a,b)>=w:
        ok=mid
    else:
        ng=mid
print(ng)

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan
from math import degrees

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

volume = a * a * b
volume_per = x / volume

if volume_per >= 0.5:
    up = b * (1 - volume_per)
    down = a / 2
else:
    up = b
    down = 2 * a * volume_per

print(degrees(atan(up/down)))

Submission status: Accepted

Solution code:
from math import atan,pi

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
from collections import deque, defaultdict
from math import sqrt, factorial, gcd, ceil, atan, pi
# def input(): return sys.stdin.readline()[:-1] # warning not \n
# def input(): return sys.stdin.buffer.readline().strip() # warning bytes
# def input(): return sys.stdin.buffer.readline().decode('utf-8')
import string
# string.ascii_lowercase
from bisect import bisect_left
MOD = int(1e9)+7
INF = float('inf')


def solve():
    # n, m = [int(x) for x in input().split()]
    a, b, x = [int(x) for x in input().split()]
    y = x / a
    if y < a * b / 2:
        c = 2 * y / b
        print(atan(b/c)*180/pi)
    else:
        z = a * b - y
        c = 2 * z / a
        print(atan(c/a)*180/pi)


    


t = 1
# t = int(input())
for case in range(1,t+1):
    ans = solve()


"""

azyxwvutsrqponmlkjihgfedcb

"""

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int,input().split())
lb = 0
ub = 90

while ub - lb > 0.5 * 10**-6:
    theta = (lb+ub) / 2
    tt = math.tan(math.radians(theta))
    tt9 = math.tan(math.radians(90 - theta))
    
    if b * tt9 >= a:
        y = a*a*b - a * a*a*tt/2 - x
        if y < 0:
            ub = theta
        else:
            lb = theta
    else:
        y = a * b*b*tt9/2 - x
        if y < 0:
            ub = theta
        else:
            lb = theta
print(theta)

Submission status: Accepted

Solution code:
import math
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

vol = (a ** 2) * b

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

Submission status: Accepted

Solution code:
import math
from fractions import Fraction
a,b,x=map(int,input().split())
if b*(a**2)<=x*2:
    print(math.degrees(math.atan(Fraction(2*(a*a*b-x),a**3))))
else:
    print(math.degrees(math.atan(Fraction(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:
  y = 2*b-2*x/(a**2)
  print(math.degrees(math.atan2(y,a)))
else:
  y = 2*x/(a*b)
  print(90-math.degrees(math.atan2(y,b)))

Submission status: Accepted

Solution code:
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
import math
from sys import stdin
input = stdin.readline


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

  # y = 2*(b-(x/a**2))/a
  # yd = 2*x/(a*b**2)
  # print(y, yd)
  if x > 0.5*a*a*b:
    print(math.degrees(math.atan( 2*(b-(x/a**2))/a )))
  else:
    print(90 - math.degrees(math.atan( (2*x/(a*b**2)) )))


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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import math
a,b,x = (int(i) for i in input().rstrip('\n').split())
if b*(a**2)<2*x:
  S=2*(b*(a**2)-x)
  res = math.atan2(S,a**3)
  res2 = math.degrees(res)
  print(res2)
else:
  res = math.atan2(2*x,a*(b**2))
  res2 = math.degrees(res)
  print(90-res2)

Submission status: Accepted

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

if x >= 0.5 * a**2 * b:
    tan_x = 2*(b*a**2 -x)/a**3

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

print(math.degrees(math.atan(tan_x)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

x = x / a

if x > a * b / 2:
    print(math.atan2((a * b - x) * 2, a ** 2) * 180 / math.pi)
else:
    print(math.atan2(b ** 2, x * 2) * 180 / math.pi)

Submission status: Accepted

Solution code:
import math

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

x = x / a


def f(t):
    tan = math.tan(t)
    if tan <= b / a:
        return (a * b) - (a * a * tan / 2)
    else:
        return b * (b / tan) / 2


left = 0.0
right = math.pi / 2

for i in range(10000):
    theta = (left + right) / 2
    if f(theta) >= x:
        left = theta
    else:
        right = theta

print(left / math.pi * 180)

Submission status: Accepted

Solution code:
import decimal
import math
a,b,x=map(int,input().split())
num1=a*a*b-x
if (a*a*b)/2<x:
    num2=decimal.Decimal((num1*2)/(a*a))
    num3=decimal.Decimal(math.sqrt(decimal.Decimal((a*a)+decimal.Decimal(num2*num2))))
    num4=decimal.Decimal((a*a+decimal.Decimal(num3*num3)-decimal.Decimal(num2*num2))/decimal.Decimal(2*decimal.Decimal(a*num3)))
    ans=math.degrees(math.acos(num4))
else:
    num2=decimal.Decimal((x*2)/(a*b))
    num3=decimal.Decimal(math.sqrt(decimal.Decimal((b*b)+decimal.Decimal(num2*num2))))
    num4=decimal.Decimal((num2*num2+decimal.Decimal(num3*num3)-decimal.Decimal(b*b))/decimal.Decimal(2*decimal.Decimal(num2*num3)))
    ans=math.degrees(math.acos(num4))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

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

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

s = a * b

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

deg = math.degrees(theta)

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

Submission status: Accepted

Solution code:
import sys
from math import atan2, pi

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
 
a, b, x = map(int, read().split())

s = x / a

if s > a*b/2:
    theta = atan2(2*(a*b-s), a**2)
else:
    theta = atan2(b**2, 2*s)

print(theta * 180 / pi)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import defaultdict, deque
from math import atan, pi

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:
a,b,x=map(int,input().split())
import math
if x/a<=a*b/2:
  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
a, b, x = [int(w) for w in input().split()]

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

print(math.degrees(rad))

Submission status: Accepted

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

Submission status: Accepted

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

print(math.degrees(y))

Submission status: Accepted

Solution code:
#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

import math

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

    # 2次元で考える
    X /= A

    # 水位が, 断面の対角線より上
    if X > A*B/2:
        ans = math.atan(2*(A*B-X)/(A**2))
    # 水位が, 断面の対角線より下
    else:
        ans = math.atan(B**2/(X*2))
    
    print(ans * 180 / math.pi)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
if x == (a**2*b)/2:
    print(45)
elif 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
a,b,x=map(int,input().split())
if x < a*a*b/2:
  print(math.degrees(math.atan((a*b*b)/(2*x))))
else:
  print(math.degrees(math.atan(2*(a*a*b-x)/(a**3))))

Submission status: Accepted

Solution code:
from math import atan, pi

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

import math 

if x>= a**2*b/2:
    tan = 2*(b/a-x/(a**3))
    y = math.atan(tan)
else :
    tan = a*(b**2)/(2*x)
    y = math.atan(tan)

print(math.degrees(y))

Submission status: Accepted

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

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