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
import sys

input = sys.stdin.readline


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


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

Submission status: Accepted

Solution code:
import math


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

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

if __name__ == '__main__':
    a,  b, x = map(int, input().split())
    if 2.0 * (b - x / a / a) <= b:
        print(math.degrees(math.atan(2.0 * (b - x / a / a) / a)))
    else:
        print(math.degrees(math.atan((a * b * b)/2.0/x)))

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

Submission status: Accepted

Solution code:
from math import atan, degrees
a,b,x=[int(i) for i in input().split()]
x/=a
y=2*x/b

if y>a:
    c=b-(2*x-b*a)/a
    print(degrees(atan(c/a)))
    quit()

else:
    print(90-degrees(atan(y/b)))
    quit()

Submission status: Accepted

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

if a*b>=2*x:
    print (math.degrees(math.pi/2-math.atan(2*x/(b**2))))
else:
    y=2*x/a-b
    try:
        print(math.degrees(math.pi/2-math.atan(a/(b-y))))
    except ZeroDivisionError:
        print(0)

Submission status: Accepted

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

menseki=1.0*x/a
teihen=2.0*menseki/b
#print(menseki,teihen)

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

Submission status: Accepted

Solution code:
import math as m

abx = input().split(' ')
a = float(abx[0]) #側面の底辺
b = float(abx[1]) #側面の高さ
x = float(abx[2]) #水の容積
s = x / a #側面の面積

if s > a * b / 2:
  Q = 2 * (a * b - s) / (a * a)
else:
  Q = (b * b) / (2 * s)

ans = m.degrees(m.atan(Q))
print(ans)

Submission status: Accepted

Solution code:
import math

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

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

if p == 0:
    print(45)
    exit()

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

Submission status: Accepted

Solution code:
import math

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

tant = 2*b/a - 2*x/a**3

if tant >= 0 and tant <= b/a:
  ans = math.atan(tant)/math.pi*180
else:
  tant = 0.5 * a*b**2/x
  ans  = math.atan(tant)/math.pi*180
  
print(ans)

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
import sys,bisect,math,itertools,string,queue
from heapq import heappop, heappush
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

a,b,x = inpl()

if a*a*b == x:
    print(0)
    quit()
if x/(a**2*b) <= 0.5:
    tmp = ((2*x)/(a*b)) / b
    atan1 = math.degrees(math.atan(tmp))
    print(90-atan1)
else:
    c = 2*(b-x/(a*a))
    tmp = a/c
    atan1 = math.degrees(math.atan(tmp))
    print(90-atan1)

Submission status: Accepted

Solution code:
import sys
from pprint import pprint

import math

a, b, x = map(int, sys.stdin.readline().strip().split(" "))

threshold = math.atan(b/a)
# print(threshold / math.pi * 180)

theta = math.atan(2*(a**2 * b - x) / a**3)
# print("theta", theta / math.pi * 180)
if theta <= threshold:
    print(theta / math.pi * 180)
else:
    theta = math.atan(2*x / (a * b**2))
    print(90 - theta / math.pi * 180)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import tan, pi, cos, sqrt

a, b, x = map(int, input().split())
v = a*a*b
lft, rgt = 0, 180
for _ in range(100000):
    theta = (lft+rgt)/2
    height = a*tan(theta/180*pi)
    if height <= b:
        amnt = v - a*a*height/2
    else:
        c = (height - b)/tan(theta/180*pi)
        amnt = v - a*a*b/2 - a*b*c/2
    if x > amnt:
        rgt = theta
    else:
        lft = theta
print(theta)

Submission status: Accepted

Solution code:
import sys
from math import degrees, atan

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())

sys.setrecursionlimit(10 ** 9)


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    a, b, x = [int(x) for x in input().split()]
    b_now = x / (a * a)
    menseki = b_now * a
    ans_a = menseki * 2 / b

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

    if ans_a <= a:
        z = math.degrees(math.atan(ans_a / b))
        print(90 - z)
        exit()
    else:
        menseki = a * b - menseki
        ans_b = menseki * 2 / a
        z = math.degrees(math.atan(a / ans_b))
        print(90 - z)
        exit()



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

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

ans=0

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

	
	
print(np.rad2deg(ans))

Submission status: Accepted

Solution code:
import math

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

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

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

print(theta)

Submission status: Accepted

Solution code:
import math

abc = input()
abc_list = abc.split(' ')
abc_intlist = []
for c1 in abc_list:
  abc_intlist.append(int(c1))
a = abc_intlist[0]
b = abc_intlist[1]
x = abc_intlist[2]
if (a**2)*b<2*x:
    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 sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
import math

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

V = A * A * B

H = X / V * B
H2 = A * X / V 

lb = 0
ub = 90

def judge(s):
    global A
    global B
    global H

    if (B - H) * math.cos(s * math.pi/180) - A / 2 * math.sin(s * math.pi/180) >= 0:
        return True
    else:
        return False

def judge2(s):
    global A
    global B
    global H2

    if B/2 * math.cos(s * math.pi/180) - H2 * math.sin(s * math.pi/180) >= 0:
        return True
    else:
        return False

for i in range(100):
    mid = (lb + ub) / 2
    if judge(mid):
        lb = mid
    else:
        ub = mid

if H < B/2:
    print(math.atan(B/2/H2)*180/math.pi)
else:
    print(mid)

Submission status: Accepted

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

theta = 0.0
if (x <= 0.5*a*a*b):
    theta = atan(0.5*a*b*b/x)
else:
    theta = atan( 2.0*(b-x/(a*a))/a )
theta = theta * 180 / pi
print('{:.10f}'.format(theta))

Submission status: Accepted

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

import math

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

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

Submission status: Accepted

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

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


print(theta)

Submission status: Accepted

Solution code:
# coding : utf-8

import numpy as np

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

#傾けたあとの水面が「底面」か「側面」かの判定
lim_x = float(a*a*b) / 2.0

# 「側面」
if( x >= lim_x ):
    #空白部分
    x_non = float(a*a*b - x)
    #
    tmp_b = float(2*x_non) / float(a*a)
    #
    r = np.sqrt(a*a+tmp_b*tmp_b)
    #
    tmp_a = a
    #tmp_b = tmp_b
    tmp_c = r
    cos_sita = (tmp_a**2+tmp_c**2-tmp_b**2) / (2*tmp_a*tmp_c)
    
    sita = np.arccos(cos_sita)
    
    print(np.rad2deg(sita))
# 「底面」
elif( x < lim_x ):
    #傾けたときの水面と地面の距離
    a_x = (2.0 * x) / ( a * b )
    # 相似比
    scale = a_x / np.sqrt(b*b + a_x*a_x)
    
    under_a = a_x * scale
    under_b = b * scale
    
    #余弦定理
    tmp_a = a_x
    tmp_b = under_b
    tmp_c = under_a
    cos_sita = (tmp_a**2+tmp_c**2-tmp_b**2) / (2*tmp_a*tmp_c)
    
    sita = np.arccos(cos_sita)
    
    print(np.rad2deg(sita))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x = list(map(int, input().split()))
if x<= a**2*b/2:
    h1 = x/a /b *2
    l = math.sqrt(b**2 + h1**2)
    h2 = x/a /l *2
    #print(h1, l, h2)
    ans = math.degrees(math.acos(h2/b))

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter, deque, defaultdict
from math import factorial
from fractions import Fraction
import heapq, bisect
import math
import itertools
sys.setrecursionlimit(10 ** 5 + 10)
INF = 10**15 +5
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))


a, b, x = MAP()
S = Fraction(x, a)
x = Fraction(S, a)

if 2*x >= b:
    print(math.degrees(math.atan(float(Fraction((2*b - 2*x), a)))))
else:
    print(math.degrees(math.atan(float(Fraction(b**2,2*S)))))

Submission status: Accepted

Solution code:
import math

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

y = a * (b ** 2) / (2 * x)
z = 2 * (a**2 * b - x)/ a**3
u = z * a
t = math.atan(y)
t = math.degrees(t)
p = math.atan(z)
p = math.degrees(p)
if u >= b:
    print(t)
else:
    print(p)

Submission status: Accepted

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

import math
if x / (a**2) > b / 2:
    tmp = ((2 * (a**2) * b) - (2 * x)) / (a**3)
    angle = math.degrees(math.atan(tmp))
else:
    tmp = (a * (b**2)) / (x * 2)
    angle = math.degrees(math.atan(tmp))

print(angle)

Submission status: Accepted

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

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

else:
        print(math.degrees(math.atan2(b,l2)))

Submission status: Accepted

Solution code:
import math
a,b,x = list(map(int, input().split()))
h = x / ((a**2)*b)
# print(h)
height = (2 * x)/(a**2) - b
if height >= 0:
    angle = math.degrees(math.atan((b-height)/a))
    print(angle)
else:
    base = (2 * x)/(b*a)
    angle = math.degrees(math.atan(b/base))
    print(angle)

Submission status: Accepted

Solution code:
import math

nums = list(map(int, input().split(" ")))

a = nums[0]
b = nums[1]
x = nums[2]

bottle = a * a * b

if bottle / 2.0 < x:
    temp = bottle - x
    y = temp * 2 / a / a
    result = math.degrees(math.atan(y/a))
else:
    y = x * 2 / b / a
    result = math.degrees(math.atan(b/y))

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(int(1e6))

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

import math

# 水筒の残りの体積
m = a*a*b - x
# 残りの体積の高さ
n = m / (a*a)

# 水筒の底面が現れる場合とそうでない場合
if n < (b / 2):    
    tan_k = n / (a/2)
else:
    # x = a * (1/2*b*d)
    d = 2 * x / (a * b)
    tan_k = b / d

k_rad = math.atan(tan_k)
ans = k_rad * 180 / math.pi

print(ans)

Submission status: Accepted

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


def main():
    a, b, x = map(int, input().split())
    if x == a**2 * b:
        print(0)
    elif x > a**2 * b / 2:
        h = (2*x)/a**2 - b
        theta = math.atan((b-h)/a)
        print(math.degrees(theta))
        # print(h)
    else:
        w = a - (2*x)/(a*b)
        theta = math.atan(b/(a-w))
        print(math.degrees(theta))
        # print(w)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b,v = map(int,input().split())
import math
s = v/a
if 2*s < a*b:
  sin = b/math.sqrt((b**2)+(4*(s**2)/(b**2)))
  print(math.degrees(math.asin(sin)))
elif 2*s == a*b:
  sin = b/math.sqrt((b**2)+(a**2))
  print(math.degrees(math.asin(sin)))
else:
  sin = 2*(a*b-s)/math.sqrt(((4*((a*b-s)**2))/(a**2))+(a**2))/a
  print(math.degrees(math.asin(sin)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import numpy as np
a,b,x = map(int,input().split())
V = a * a * b
dV = V - x
if x == V:
  print("0")
  
elif x >= V / 2:
  h = dV / V * b * 2
  theta = np.arctan(a / h) * 360 / (2 * np.pi)
  print(90-theta)
  
else:
  h = x / V * a * 2
  theta = np.arctan(h / b) * 360 / (2 * np.pi)
  print(90-theta)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import os
import sys
# from fractions import gcd
input = sys.stdin.readline

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


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

    h = x / float(a ** 2)
    remain = b - h
    ans = math.degrees(math.atan2(remain, a/2))
    limit = math.degrees(math.atan2(h, a/2))
    # limit = x / float(a ** 2)
    # # limit_degree = math.degrees(math.atan2(limit, a))
    # print(limit + h < b)
    # print(limit)

    if ans <= limit:
        print(ans)
    else:
        # x = b * a * t / 2
        t = 2 * x / (b * a)
        deg = math.degrees(math.atan2(b, t))
        print(deg)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

import math

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

v = a * a * b

if x < v/2:  # over 45
    c = x * 2 / (a * b)
    print(90 - math.degrees(math.atan2(c, b)))
else:
    x = v - x
    c = x * 2 / (a * a)
    print(math.degrees(math.atan2(c, a)))

Submission status: Accepted

Solution code:
import sys
import math


def solve(a: int, b: int, x: int):
    V = a * a * b
    if x * 2 > V:
        y = x / (a*a*0.5) - b
        print(math.atan2(b-y, a)/math.pi*180)
    else:
        y = x / (a*b*0.5)
        print(math.atan2(b, y)/math.pi*180)
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    ans = solve(a, b, x)
    if ans is not None:
        print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from decimal import *
import math

def main():
    a, b, x = map(int, input().split())
    if a * a * b == x:
        print(0)
        exit()
    if Decimal(a) * Decimal(b) / Decimal(2) >= Decimal(x) / Decimal(a):
        tmp = Decimal(2) * Decimal(x) / (Decimal(a) * Decimal(b))
        c = math.atan(Decimal(tmp) / Decimal(b))
        d_deg = math.degrees(Decimal(c))
        print(Decimal(90) - Decimal(d_deg))
    else:
        d = (Decimal(2) * Decimal(x) / (Decimal(a) * Decimal(a))) - Decimal(b)
        c = math.atan(Decimal(a) / (Decimal(b) - Decimal(d)))
        d_deg = math.degrees(Decimal(c))
        print(Decimal(90) - Decimal(d_deg))


if __name__ == "__main__":
    main()

Submission status: Accepted

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

if x <= a**2 * b / 2:
    print(90. - np.rad2deg(np.arctan(2*x/(a*b**2))))
else:
    print(np.rad2deg(np.arctan(2*(b-x/(a**2))/a)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import numpy as np

# スペース区切りの整数の入力
a, b, x = map(int, input().split())

y = 2*x/(a*a) - b
if(y >= 0):
  theta = np.arctan((b-y)/a)
else:
  z = 2*x/(a*b)
  theta = np.arctan(b/z)

# 出力
print("{}".format(np.rad2deg(theta)))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt


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


def LF(): return list(map(float, input().split()))


def LI_(): return list(map(lambda x: int(x)-1, input().split()))


def II(): return int(input())


def IF(): return float(input())


def LS(): return list(map(list, input().split()))


def S(): return list(input().rstrip())


def IR(n): return [II() for _ in range(n)]


def LIR(n): return [LI() for _ in range(n)]


def FR(n): return [IF() for _ in range(n)]


def LFR(n): return [LI() for _ in range(n)]


def LIR_(n): return [LI_() for _ in range(n)]


def SR(n): return [S() for _ in range(n)]


def LSR(n): return [LS() for _ in range(n)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    A, B = LI()

    if A >= 1 and A <= 9 and B >= 1 and B <= 9:
        print(A*B)
    else:
        print(-1)
    return

# B


def B():
    N = II()
    if N <= 81 and N > 9:
        for i in range(2, 10):
            if N % i == 0 and N/i <= 9:
                print('Yes')
                return

    elif N > 81:
        print('No')
        return
    else:
        print('Yes')
        return
    print('No')

    return

# C


def C():
    N = II()
    
    
    L=[]
    count=0
    for i in range(2,int(sqrt(N)+2)):  
        if N%i==0:
            L.append(N/i)
            count=1
    if count==0:
        print(N-1)
    else :
        print(int(L[-1]-2+(N/L[-1])))


            

    
   

    return

# D


def D():
    
    a, b ,x = LI()
    BIG=a*a*b/2
    if x>BIG:
        y=2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y=2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return

# E


def E():
    N, M = LI()
    bit_max = 1 << N
    dp = [[inf for i in range(bit_max)] for j in range(M+1)]
    dp[0][0] = 0

    for i in range(M):
        a, b = LI()

        c = LI()
        bit = 0

        for d in c:
            bit |= 1 << (d-1)

        for w in range(bit_max):

            t = w | bit
            cost = dp[i][w] + a

            dp[i+1][t] = min(dp[i+1][t], cost)

            dp[i+1][w] = min(dp[i][w], dp[i+1][w])

    print(-1) if dp[-1][-1] == inf else print(dp[-1][-1])

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':
    D()

Submission status: Accepted

Solution code:
import math

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

    if x <= a*a*b*0.5:
        y = 2*x/(a*b)
        p = y/((b**2 + y**2)**0.5)
        ans = math.degrees(math.acos(p))
    elif x < a*a*b:
        k = (2*a*x - a*a*a*b)/(2*a*a*b -2*x)
        ans = math.degrees(math.atan(b/(a+k)))
    else:
        ans = 0
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

from math import atan,tan,pi

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

def max_volume(theta):
    # 弧度法にする
    theta = theta/180*pi
    if theta<atan(b/a):
        # 半分より上のパターン
        area = a*b-a*a*tan(theta)/2
    else:
        area = b*(b/tan(theta))/2
    return area*a

left = 0 # おさまっている
right = 90 # あふれている
while right - left > 1e-7:
    mid = (left+right)/2
    if max_volume(mid) <= x:
        right = mid
    else:
        left = mid

answer = (left+right)/2
print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

import math


def solve(a, b, x):
    # 面積になおす
    area = a * b
    x = x / a
    # 一杯のとき
    if x == area:
        return 0.0
    # 半分以上のとき
    if x >= area * 0.5:
        not_x = area - x
        h = 2.0 * not_x / a
        # print('x', x)
        # print('not_x', not_x)
        # print('h=', h)
        return math.degrees(math.atan2(h, a))
    # 半分以下のとき
    h = 2.0 * x / b
    # print('x=', x)
    # print('h=', h)
    return 90.0 - math.degrees(math.atan2(h, b))

if __name__ == '__main__':
    a, b, x = map(int, input().split())

    ans = solve(a, b, x)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import bisect
import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
mod = 10**9 + 7
inf = float('inf')
a, b, x = LI()
ans = float(0)
c = float(0)
V = (a**2)*b

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

elif x==V/2:
    c = x/(V/2)
    ans = math.degrees(math.atan(a*c/b))
else:
    c = x/(V/2)
    ans = 90 - math.degrees(math.atan(a*c/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):
    right = x - b*(a**2)
    left = -(a**2)/2
    y = right/left

    alpha = math.degrees(math.atan(y/a))
else:
    right = x
    left = b*a/2
    y = right/left
    alpha = math.degrees(math.atan(b/y))
    
print(alpha)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

print(90 - theta)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
if (2 * x > a * a * b):
    #空の部分から
    h = 2 * (x-a*a*b) / (a*a)
    print(-math.degrees(math.atan(h/a)))
else:
    #水の部分から
    print(90-math.degrees(math.atan(2*x/(a*b*b))))

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
if x < a**2*b/2:
    theta = math.atan(a*b**2/2/x)/math.pi*180
else:
    theta = math.atan(2*(a**2*b-x)/(a**3))/math.pi*180
print('{:.12g}'.format(theta))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

L = a*a*b
s = x/a

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

Submission status: Accepted

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

Submission status: Accepted

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

x = x / a * 2
vx = vx / a * 2


adig = math.degrees(math.atan(
  vx / (a ** 2)
))
bdig = math.degrees(math.atan(
  (b ** 2) / x
))

if math.tan(math.radians(adig)) * a <= b:
  print(adig)
else:
  print(bdig)

Submission status: Accepted

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

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

    else:
        theta = math.atan(2 * V / (a * b**2))

    print(90 - theta * 180 / math.pi)

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

Submission status: Accepted

Solution code:
import math
t=input().split(' ')
a=int(t[0]);b=int(t[1]);x=int(t[2])
if x>=a**2*b*0.5:
    print(math.degrees(math.atan(2*b/a-2*x/a**3)))
else:
    print(math.degrees(math.atan(a*b**2/(2*x))))

Submission status: Accepted

Solution code:
import math
def main():
    a, b, x = [float(i) for i in input().split()]
    alpha = math.atan2(a,b)
    theta_1 = math.atan2(((2. * a**2.) * b - 2. * x), a**3.)
    theta_2 = math.atan2((b ** 2.) * a , (2.*x))
    flag = False
    if theta_1 < math.pi/2. - alpha:
        print(math.degrees(theta_1))
    else:
        print(math.degrees(theta_2))
main()

Submission status: Accepted

Solution code:
import math as m


def calc(a, b, x):
    if x > a * a * b / 2:
        y = 2 * (a * a * b - x) / a ** 3
        return m.degrees(m.atan(y))
    else:
        y = a * b * b / 2 / x
        return m.degrees(m.atan(y))


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