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 = input().split()
a=int(a)
b=int(b)
x=int(x)
volume = a * a * b
if x<(volume/2):
    state=-1 #반보다 적을때
else:
    state=1 #반이상

if state==-1:
    angle=90-math.degrees(math.atan(x/(b*b*a/2)))
else:
    angle=math.degrees(math.atan((volume-x)/(a*a*a/2)))
print(angle)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
A, B, X = map(int, input().split())
h = X / A / A
if h * 2 >= B:
    print(math.degrees(math.atan2(2*B - 2*h, A)))
else:
    print(90-math.degrees(math.atan2(2*X/A/B, B)))

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split(' '))
x = x/a
#print(x)
# type1
if x >= a*b/2:
    t = 2*x/a -b
    ans = math.atan2(b-t,a)
else:
    t=2*x/b
    ans = math.atan2(b,t)
print(math.degrees(ans) )

Submission status: Accepted

Solution code:
str_list = input().split(' ')
int_list = [int(x) for x in str_list]

a, b, x = int_list[0], int_list[1], int_list[2]

import numpy as np

if x < 0.5 * a * a * b:
    theta = 180/np.pi*np.arctan( (a*b*b)/(2*x) )
    print(theta)
else:
    theta = 180/np.pi*np.arctan( 2.0*(a*a*b-x)/(a**3) )
    print(theta)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

half = a * a * b / 2
if half > x:
    height = 2 * x / a / b
    print(90.0 - math.degrees(math.atan(height/b)))
else:
    rest = a * a * b - x
    width = rest / (a * a / 2)
    print(math.degrees(math.atan(width / a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
s = x / a
if s <= a * b / 2.0:
  c = s / b * 2.0
  d = (b ** 2 + c ** 2) ** 0.5
  h = s / d * 2.0
  theta = math.acos(h / b)
else:
  s = a * b - s
  c = s / a * 2.0
  d = (a ** 2 + c ** 2) ** 0.5
  h = s / d * 2.0
  theta = math.asin(h / a)
print(math.degrees(theta))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from math import *

a, b, c = map(int, input().split())
d = 0

if a * b / 2 >= c / a:
    d = atan(a * b * b / (2 * c)) * 180 / pi
else:
    y = 2 * c / (a * a) - b
    d = atan((b - y) / a) * 180 / pi

print("%.8f" % d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

A, B, X = MAP()
V = A* A * B - X

if V < X:
    # Y = 2 * vacant / A / A
    if V > 0:
        ans = 90 - math.degrees(math.atan(A**3 / (2*V)))
    else:
        ans = 0
else:
    # Y = 2 * X / A / B
    ans = 90 - math.degrees(math.atan(2 * X / (A*B*B)))
print(ans)

Submission status: Accepted

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

if x > (0.5*(a**2)*b):
    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
tem = input().split()
a = int(tem[0])
b = int(tem[1])
x = int(tem[2])

if x >= a*a*b/2:
    flag = 1
else:
    flag = 0

if flag ==1:
    #print('debug')
    sq = a*a*b - x
    #print(sq)
    x = sq * 2 / (a*a)
    result = math.degrees(math.atan(x/a))
elif flag ==0:
    #print('aaa')
    sq = x
    x = sq * 2 /(a*b)
    result = math.degrees(math.atan(b/x))

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

t = 0
if (A**2)*B/X >= 2:
    t = float((A*(B**2))/(2*X))
else:
    t = float((2*(A**2)*B-2*X)/(A**3))

print(math.atan(t)*180/math.pi)

Submission status: Accepted

Solution code:
import math
a,b,x =map(int,input().split( ))
if x >= (a**2*b/2):
    k=2*x/(a**2)-b
    cos=math.sqrt((b-k)**2/((a**2)+(b-k)**2))
    print(90-math.degrees(math.acos(cos)))
else:
    k=2*x/(a*b)
    cos=math.sqrt(b**2/(b**2+k**2))
    print(90-math.degrees(math.acos(cos)))

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

initial_base_guess = 2 * x / (a * b)
if(initial_base_guess <= a):
	print(degrees(atan2(b, initial_base_guess)))
else:
	y = (2*x)/ (a*a) - b
	print(degrees(atan2(b-y, a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

print(90 - theta)

Submission status: Accepted

Solution code:
#!/usr/bin/pypy
import math
a, b, x = map(float, raw_input().split())

V= a * a * b

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

Submission status: Accepted

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

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

elif x > (a*a*b)/2:
  c = ((2*x)/(a*a)) - b
  tan = (b-c)/a
  print(np.rad2deg(math.atan(tan)))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
get = lambda: int(raw_input().strip())
getl = lambda: raw_input().strip()
gets = lambda: map(int, raw_input().strip().split())
getss = lambda n: [gets() for _ in xrange(n)]

import math

a, b, x = gets()
# a, b, x = 2, 2, 4
# a, b, x = 12, 21, 10
# a, b, x = 3, 1, 8

p = math.pi / 180
v = a * a * b

over = False

if x > v / 2:
    x = v - x
    over = True

if over:
    atan = x * 2.0 / a / a / a
    alpha = math.atan(atan) / p
    print alpha
else:
    atan = x * 2.0 / a / b / b
    alpha = math.atan(atan) / p
    print 90 - alpha

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

import math

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

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

print(atan1)

Submission status: Accepted

Solution code:
import math
a,b,v=map(int,input().split())
theta1=0
theta2=math.pi/2
ans=10**9
if a*a*b-v==0:
    print(0)
    exit()
if a*a*b/2>=v:
    while 1:
        tmp=math.tan((theta1+theta2)/2)-2*v/(a*b*b)
        if abs(tmp)<=10**(-6):
            ans=(theta1+theta2)/2
            break
        else:
            if tmp>0:
                theta2=(theta1+theta2)/2
            else:
                theta1=(theta1+theta2)/2
else:
    while 1:
        tmp=math.tan((theta1+theta2)/2)-(a**3)/(2*(a*a*b-v))
        if abs(tmp)<=10**(-6):
            ans=(theta1+theta2)/2
            break
        else:
            if tmp>0:
                theta2=(theta1+theta2)/2
            else:
                theta1=(theta1+theta2)/2
print(90-math.degrees(ans))

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
import sys
import math
a, b, x = [float(i) for i in sys.stdin.readline().split()]

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

Submission status: Accepted

Solution code:
import math
a,b,x = map(float,input().split())
area = x / a
tri_area = 0.5 * a * b
if area == tri_area:
    shahen = (a**2 + b**2) ** 0.5
    rad = math.acos(a/shahen)
    print(math.degrees(rad))
elif area < tri_area:
    teihen = area*2 / b
    shahen = (teihen**2 + b**2) ** 0.5
    rad = math.acos(teihen/shahen)
    print(math.degrees(rad))
else:
    height = b - x / a**2
    teihen = a / 2
    shahen = (height**2 + teihen**2) ** 0.5
    rad = math.acos(teihen / shahen)
    print(math.degrees(rad))

Submission status: Accepted

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

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

Smax = a * b
S = x / a

import math
if S <= (Smax/2):
  a_ = S * 2 / b
  print(math.degrees(math.atan(b/a_)))
else:
  a_ = (Smax - S) * 2 / a
  print(math.degrees(math.atan(a_/a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

height = x / (a ** 2)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

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

tmp = (2*a**2*b-2*x)/a**3
theta0 = math.degrees(math.atan(tmp))
aa = (2*b-a*math.tan(math.radians(theta0)))*a**2/2
if a*math.tan(math.radians(theta0)) < b and abs(x-aa) < 10-9:
    print(theta0)
    sys.exit()

theta1 = math.degrees(math.atan(2*x/a**3))
bb = a**3*math.tan(math.radians(theta1))
if a*math.tan(math.radians(theta1)) < b and abs(x-bb) < 10e-9:
    print(theta1)
    sys.exit()

theta2 = math.degrees(math.atan(a*b**2/(2*x)))
print(theta2)
cc = a*b**2/(2*math.tan(math.radians(theta2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

if __name__ == "__main__":
	a, b, x = map(float, input().split())
	if x / a >= a * b / 2:
		t = 2.0 * (b - x / (a * a)) / a
	else:
		t = a * b * b / (2 * x)
	ans = math.degrees(math.atan(t))
	print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x =map(int,input().split( ))
if x >= (a**2*b/2):
    k=2*x/(a**2)-b
    cos=math.sqrt((b-k)**2/((a**2)+(b-k)**2))
    print(90-math.degrees(math.acos(cos)))
else:
    k=2*x/(a*b)
    cos=math.sqrt(b**2/(b**2+k**2))
    print(90-math.degrees(math.acos(cos)))

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

v = a*a*b

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

t = None
if x >= v/2:
    pad = a*a*b - x
    h = (2*pad)/(a*a)
    t = np.arctan(h/a)
else:
    w = (2*x)/(a*b)
    t = np.arctan(b/w)
print(t*180/np.pi)

Submission status: Accepted

Solution code:
import math

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


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

Submission status: Accepted

Solution code:
#%%
import math 

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

Submission status: Accepted

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

Submission status: Accepted

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

l = 0
r = math.pi/2
for i in range(100):
    c = (l+r)/2
    tx = math.tan(c)
    if tx < t:
        d = a**2 * (2*b - a*tx)/2
    else:
        d = a * b * b / (2*tx)
    if d < x:
        r = c
    else:
        l = c
print(math.degrees(r))

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

theta = math.degrees(math.atan(tan_theta))
print(theta)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import tan,pi,radians
a,b,x = map(int,input().split())
ok = 0
ng = 90
if 2*x >= a**2*b:
    while ng-ok > 10**(-7):
        mid = (ok+ng)/2
        if a*a*b-a**3*tan(radians(mid))/2 >=x:
            ok = mid
        else:
            ng = mid
else:
    while ng-ok > 10**(-7):
        mid = (ok+ng)/2
        if a*b**2 > 2*x*tan(radians(mid)):
            ok = mid
        else:
            ng = mid

print(ok)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

def solve():
  A, B, X = map(int, input().split())
  if (A ** 2) * B / 2 >= X:
    return math.degrees(math.atan2(B, (X * 2) / (A * B)))
  else:
    b = (X * 2) / (A ** 2) - B
    return math.degrees(math.atan2(B - b, A))

print(solve())

Submission status: Accepted

Solution code:
import math


def to_angle(x):
    return x * 180 / math.pi


def main():
    a, b, x = map(float, raw_input().split())
    v = a * a * b
    if v <= x * 2:
        print(to_angle(math.atan(2 * (v - x) / a ** 3)))
    else:
        print(to_angle(math.atan(a * b * b / x * 0.5)))


main()

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
import bisect
import math
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    a, b, x = LMIIS()


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







if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

if (a ==1 and b==1 and x ==1) or (a*a*b == x):
    print(0)    

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

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(int,input().split()))
if x >= ((a**2)*b)/2:
    x = (x * 2)/(a**2) #台形の面積
    tan_theta = (2*b - x)/a
    theta = math.atan(tan_theta)
    ans = math.degrees(theta)
else:
    tan_theta = (a*(b**2))/(2*x)
    theta = math.atan(tan_theta)
    ans = math.degrees(theta)

print(ans)

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
ok = 0.0
ng = 90.0
z = math.degrees(math.atan2(b,a))

def f(y):
    if y >= z:
        return b*b*a/(math.tan(math.radians(y))*2.0)
    else:
        return a*a*b-a*a*a*math.tan(math.radians(y))/2.0


for _ in [0]*1000:
    mid = (ok+ng)/2
    if f(mid) >= x:
        ok = mid
    else:
        ng = mid

print(ok)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
ii0 = lambda: ii() - 1
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')

def main():
    a,b,x = mis()
    import math
    if a**2*b/2 <= x:
        print(math.degrees(math.atan(2*(a**-3)*(a*a*b-x))))
    else:
        print(90-math.degrees(math.atan(2*x/a/b/b)))



main()

Submission status: Accepted

Solution code:
import numpy as np
pi=np.pi
a,b,x=map(int,input().split())
if 0<=2*x/(a**2)-b<=b:
  y=2*x/(a**2)-b
  print(np.arctan((b-y)/a)/pi*180)
else:
  y=(2*x)/(a*b)
  z=(b*b+y*y)**(1/2)
  h=(b*y)/z
  print(np.arccos(h/b)/pi*180)

Submission status: Accepted

Solution code:
import math

a,b,x=[int(x) for x in input().split()]
if x*2<=a**2*b:
    y=2*x
    theta=math.atan2(y,b*a*b)
else:
    theta=math.atan2(a**3, 2*(b*a**2-x) )
print(90-theta*180/math.pi)

Submission status: Accepted

Solution code:
import math
a,b,x = map(int, input().split())
#傾けたときにちょうど三角形になる
tri = (a*b/2)*a
tan = b/a


if x <= tri:
    y = (2*x)/(a*b)
    tan = b/y
    ans = math.degrees(math.atan(tan))

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

print(ans)

Submission status: Accepted

Solution code:
from math import atan
from math import pi

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

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

Submission status: Accepted

Solution code:
import math
def main():

    a, b, x = map(int, input().split())
    if x <= a*a*b/2:
        y = 2*x/a/b
        # print(a, y)
        # print(math.atan(b/y))
        return 180*math.atan(b/y) / (math.atan(1) * 4)
    else:
        y = (x - b*a*a/2)/(a*a/2)
        # print(a*a*b-(b-y)*a*a/2)
        # print(y)
        return 180*math.atan((b-y)/a) / (math.atan(1) * 4)


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

Submission status: Accepted

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

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

if x <= a**2*b/2:
  t = (2*x)/(a*b**2)
else:
  t = (a**3)/(2*(a**2*b-x))
#print(t)

import math
a = math.atan(t)
a = math.degrees(a)
print(90-a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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


else:
    memo = (a*(b**2))/(2*x)
    rad = math.atan(memo)
    deg = math.degrees(rad)   

print(deg)

Submission status: Accepted

Solution code:
import math

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

x = x_3 / (a*a)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re, os, math
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b, x = MAP()
s = x / a
y = s * 2 / b
if y <= a:

  sha = sqrt(b**2 + y**2)
  rad = math.acos(y/sha)
  do = math.degrees(rad)
  print(do)

  # 場合分け，三角形ver, 台形ver
else:
  s = x/a
  y = (s * 2 / a) - b
  # print(y)
  sha = sqrt(a ** 2 + (b-y) ** 2)
  rad = math.acos((b-y)/sha)
  do = math.degrees(rad)
  print(90-do)
  # print(do)

Submission status: Accepted

Solution code:
import math

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

x /= a

if a * b / 2 < x:
	# tetragon
	k = 2 * x / a - b
	print(math.degrees(math.atan((b - k) / a)))

else:
	# triangle
	tan_a = b ** 2 / (2 * x)
	print(math.degrees(math.atan(tan_a)))

Submission status: Accepted

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

Submission status: Accepted

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

V_max = a * a * b

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

print(math.degrees(theta))

Submission status: Accepted

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

if 0 <= 2*x/a/a - b <= b:
    b_ =  2*x/a/a - b
    ans = 90 - math.degrees(math.atan2(a, b - b_) )
elif 0 <= 2*x/a/b <= a:
    a_ = 2*x/a/b
    ans = 90 - math.degrees(math.atan2(a_, b ) )

print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
t1 = x * (2/(a*(b**2)))
if t1 < (a/b):
  print(90.-math.degrees(math.atan(t1)))
else:
  tmp = 2 * b - x * (2/(a**2))
  if tmp < 0.000001:
    print(0.)
  else:
    t2 = a/(2 * b - x * (2/(a**2)))
    print(90.-math.degrees(math.atan(t2)))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math

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

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