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.

Solution (Python):
def bisection(fun,start,end):
    prev=0
    while True:
        test=(start+end)/2
        if abs(test-prev)<1e-8:
            return test
        prev=test
        if fun(test)>0:
            start=test
        else:
            end=test
        
    

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

S = x/a

if x==a*a*b:
    theta=0
else:
    if S<=(a*b/2):
        fun = lambda t: b*b*(math.sin(math.radians(t))*math.cos(math.radians(t))+math.cos(math.radians(t))**3/math.sin(math.radians(t)))/2 - S
    else:
        fun = lambda t: (a*math.cos(math.radians(t))+b*math.sin(math.radians(t)))*b*math.cos(math.radians(t))-(b*b*math.cos(math.radians(t))*math.sin(math.radians(t))+a*a*math.cos(math.radians(t))*math.sin(math.radians(t))+(b*math.cos(math.radians(t))-a*math.sin(math.radians(t)))**2*math.tan(math.radians(t)))/2-S
    theta = bisection(fun,1e-6,90)
print(theta)

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

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

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

Solution (Python):
from math import atan, degrees

def main():
    a,b,x = map(int, input().split())
    if x == a**2 * b:
        print(0.0)
        exit()

    t = atan(a**3 / (2 * a**2 * b - 2 * x))
    s = atan(2 * x / (a * b**2))

    if x >= a**2 * b / 2:
        print(90.0 - degrees(t))
    else:
        print(90.0 - degrees(s))


if __name__ == "__main__":
    main()

Solution (Python):

import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
a, b, x = map(int, input().split())
if a**2*b == x:
  print(0)
  exit()
import math
if 2*x <= a**2*b:
  t1 = a*b**2
  t2 = 2*x
  ans = math.degrees(math.atan(t1/t2))
else:
  t1 = a**3
  t2 = 2*a**2*b - 2*x
  ans = 90 - math.degrees(math.atan(t1/t2))
print(ans)
if em: sys.stdin = open('/dev/tty')

Solution (Python):
import math
a,b,x=map(int,input().split())
left=a*a*b-x
if left<=x:
	degree=math.degrees(math.atan(2*left/(a*a*a)))
else:
	degree=90-math.degrees(math.atan(2*x/(a*b*b)))
print('{:.8f}'.format(degree))

Solution (Python):
import math

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

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

Solution (Python):
import math
a,b,c = map(int,input().split())
L = a**2*b
l = L/2




if c <= l:
    t = 2*c/(a*b)
    T = t/b
    
    atan1 = math.degrees(math.atan(T))
    print(90-atan1)
elif L == c:
    print(0)
else:
    x = 2*c/a**2 - b
    t = a/(b-x)
    atan1 = math.degrees(math.atan(t))
    print(90-atan1)

Solution (Python):
import math

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

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

print(deg)

Solution (Python):
from math import degrees, atan

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

print(degrees(ans))

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

Solution (Python):
import math

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

Solution (Python):
import numpy as np

def main():
	A, B, X = [int(x) for x in input().split()]

	if (A * A * B) / 2.0 >= X:
		y = (2 * X) / (A * B)
		R = np.arctan(y / B)
		print(90 - np.rad2deg(R))
	else:
		_x = (A * A * B) - X
		y = (2 * _x) / (A * A)
		try:
			R = np.arctan(A / y)
			print(90 - np.rad2deg(R))
		except:
			print(0.000000000)
		
	
if __name__ == "__main__":
	main()

Solution (Python):
import math

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

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

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

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

x_bound = a*a*b/2

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

Solution (Python):
import sys
import math
input = sys.stdin.readline

_a, _b, _x = map(int, input().split())


def chker(a, b, x):
    th = (a ** 2 * b / 2)
    if x == th:
        print(math.degrees(math.acos(a / (a ** 2 + b ** 2) ** 0.5)))
    elif x < th:
        c = 2 * x / (a * b)
        print(math.degrees(math.acos(c / (c ** 2 + b ** 2) ** 0.5)))
    else:
        c = 2 * b - 2 * x / a ** 2
        print(math.degrees(math.atan(c / a)))


chker(_a, _b, _x)

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

Solution (Python):
from math import degrees, atan
a, b, x = map(int, input().split())

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

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

Solution (Python):







import math

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


if x > a * a * b * 0.5:
    ret = math.degrees(math.atan( 2 * b / a - 2 * x / (a * a * a)))
    print('{:.10f}'.format(ret))

else:
    ret = math.degrees(math.atan((a * b * b) / (2 * x)))
    print('{:.10f}'.format(ret))

Solution (Python):
import math

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

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

Solution (Python):
from math import atan, degrees

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

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

Solution (Python):
import math
a,b,x=map(int,input().split())
s=(a**2)*b/2
b_=0
a_=0
if x==s:
  print(math.degrees(math.atan(b/a)))
elif x>=s:
  b_=(x-s)*2/(a**2)
  b=b-b_
  print(math.degrees(math.atan(b/a)))
else:
  a_=x*2/(a*b)
  print(math.degrees(math.atan(b/a_)))

Solution (Python):
import math

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

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

print(ans)

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

Solution (Python):

import math

def binsearch_float(l, r, pred): 
    assert l < r
    for _ in range(100):
        m = (l + r) / 2
        if pred(m):
            r = m
        else:
            l = m
    return r

def f(a, b, theta):
    area = 0
    w1 = a * math.cos(theta)
    h1 = a * math.sin(theta)
    w2 = b * math.sin(theta)
    h2 = b * math.cos(theta)
    if h1 < h2:
        r = (h2 - h1) / math.cos(theta)
        w3 = r * math.sin(theta)
        area += h1 * w1 / 2
        area += h2 * w2 / 2
        area += (h2 - h1) * w3 / 2
        area += (h2 - h1) * (w1 - w3)
    else:
        area += h1 * w1 / 2 * (h2 / h1) ** 2
        area += h2 * w2 / 2
    return a * area

def solve(a, b, x):
    radian = binsearch_float(0, math.pi / 2, lambda theta: f(a, b, theta) < x)
    return radian / (2 * math.pi) * 360

print('%.12f' % solve(*map(int, input().split())))

Solution (Python):
from math import degrees, atan, sqrt, tan

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

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

Solution (Python):


from math import atan, pi

def readInts():
  return [int(s) for s in input().split(" ")]

def to_degree(rad):
  return 180.0 * (rad / pi)

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

  theta = atan(b / a)
  theta1 = atan(2 * ((a ** 2) * b - x) / (a ** 3))

  if 0 <= theta1 <= theta:
    print(to_degree(theta1))
  else:
    theta2 = atan((a * (b ** 2)) / (2 * x))
    print(to_degree(theta2))

if __name__ == "__main__":
  main()

Solution (Python):
a,b,x=map(int,input().split())
import math
rec=a*a*b/2
if x==a*a*b:
    print(0)
    exit()
if x<=rec:
    c=x*2/a/b

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

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

Solution (Python):

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

Solution (Python):
import math
a,b,x = map(int,input().split())
A = 2*(a*a*b-x)
B = a*a*a
theta = math.atan(A/B)
if((b-a*math.tan(theta)) < 0): 
  theta = math.atan((a*b*b)/(2*x))
ans = math.degrees(theta)  
print(ans)

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

Solution (Python):
import numpy as np

a,b,x=map(int, input().split())
x/=a
if a*b/2 == x:
    ang = np.arctan2(b, a)
    ang_deg = np.rad2deg(ang)
    print(ang_deg)
elif a*b/2 < x:
    emp=a*b-x
    emp_b=2*emp/a
    ang = np.arctan2(emp_b, a)
    ang_deg = np.rad2deg(ang)
    
    
    print(ang_deg)
else:
    full_a=2*x/b
    ang = np.arctan2(b, full_a)
    ang_deg = np.rad2deg(ang)
    
    
    print(ang_deg)

Solution (Python):
a,b,x = list(map(int,input().split()))
from math import acos
from math import sqrt
from math import degrees
if (x/(a*a))*2 <= b:
    S = x/a
    y = 2*x/(a*b)
    c = sqrt(y*y + b * b)
    z = (b*b + c*c - y*y)/(2*c)
    theta = degrees(acos(z/b))
else:
    S = x/a
    y = (2*S)/a - b
    y = b - y
    c = sqrt(a * a + y * y)
    z = (y*y - a*a + c*c)/(2*c)
    if y == 0:
        y = 0.00000000001
    theta = degrees(acos(z/y))
print(90-theta)

Solution (Python):
import math

A = list(map(int, input().split()))

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

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

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

Solution (Python):
from math import *
a,b,x=input().split()
a=float(a)
b=float(b)
x=float(x)
if x>(a*a*b)/2:
	y = 2*(a*a*b-x)/(a*a*a)
elif x==(a*a*b)/2:
	y = b/a
else:
	y=(a*b*b)/(2*(x))
ans=(atan(y)*180)/pi
print(ans)

Solution (Python):
import numpy as np

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

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

print(theta)

Solution (Python):

from math import ceil, sqrt, atan, degrees

def solve():
    a,b,x = map(int, input().split())
    if a*a*b == x:
        return '0'
    elif 1/2*a*a*b >= x:
        t = atan(2*x/a/b/b)
    else:
        t = atan(a*a*a/2/(a*a*b-x))

    return str(90-degrees(t))
        
if __name__ == '__main__':
    print(solve())

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

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
input = sys.stdin.readline

setrecursionlimit(1000000)

dp = defaultdict(lambda x:-1)

def main():
	a,b,x = map(int,input().split())
	p = x / (a*a*b)
	if(p > 0.5):
		l = a*a*b - x
		t = 2*l / (a**2)
		print(math.degrees(math.atan(t/a)))
	else:
		l = x
		t = 2*l / (a*b)
		print(90-math.degrees(math.atan(t/b)))

def factorization(n):
	arr = []
	temp = n
	for i in range(2, int(-(-n**0.5//1))+1):
		if temp%i==0:
			cnt=0
			while temp%i==0:
				cnt+=1
				temp //= i
			arr.append([i, cnt])

	if temp!=1:
		arr.append([temp, 1])

	if arr==[]:
		arr.append([n, 1])

	return arr

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
import math
def resolve():

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

    target = 2*(a*a*b - c)/a**3
    if (c >= (a**2)*b/2):
        ans = math.degrees(math.atan(target))
        print(ans)
    else:
        ans = math.degrees(math.atan((a*b*b)/(2*c)))
        print(ans)
        
resolve()

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

Solution (Python):
import math

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


if x < a*a*b / 2.0:
  
  h = 2.0 * float(x) / (float(b) * float(a))
  rad = math.atan2(b, h)
else:
  
  h = 2.0 * (float(b) - float(x) / float(a*a))
  rad = math.atan2(h, a)

print(math.degrees(rad))

Solution (Python):
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def solve(a, b, x):
    s = x / a
    h = x / a / a
    if h * 2 <= b:
        rad = math.atan2(b * b, 2 * s)
        deg = math.degrees(rad)
    else:
        rad = math.atan2(2 * (b - h), a)
        deg = math.degrees(rad)
    return deg

if __name__ == '__main__':
    inputs = read()
    print("%.8f" % solve(*inputs))

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

Solution (Python):
def answerA():
    a, b = map(int, input().split())
    if a < 10 and b < 10:
        result = a * b
    else:
        result = -1

    print(result)


def answerB():
    def can_be_devided_by_1d(n):
        result = 'No'
        for i in range(1,10):
            floor, mod = divmod(n, i)
            if mod == 0 and floor < 10:
                result = 'Yes'
        return result

    n = int(input())
    print(can_be_devided_by_1d(n))


def answerC():
    def make_divisors(n):
        divisors = set()
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                divisors.add(i)
                if i != n // i:
                    divisors.add(n // i)
        return divisors

    n = int(input())
    divisors = make_divisors(n)
    candidates = set()

    for i in divisors:
        floor = n // i
        distance = (floor-1) + (i-1)
        candidates.add(distance)

    print(min(candidates))


import math

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

    bottom = a**2
    volume = bottom * b
    side = a * b

    if x < volume / 2:
        y = 2 * x / side
        radian = math.atan2(b, y)
    elif x > volume / 2:
        y = (2 * x - volume) / a ** 2
        h = b - y
        radian = math.pi / 2 - math.atan2(a, h)
    else:
        radian = math.atan2(b, a)

    print(math.degrees(radian))


if __name__ == '__main__':
    answer()

Solution (Python):
import math

def f(x):
   return 180 * math.atan(a * b**2 / (2 * x)) / math.pi

def g(x):
   return 90 - 180 * math.atan(a**3 / (2 * (a * a * b - x))) / math.pi

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

if a * a * b == x:
    print(0)
elif x <= a * a * b / 2:
    print(f(x))
else:
    print(g(x))

Solution (Python):
import math


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

Solution (Python):
import math

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

s = a * a
v_max = s * b
v_space = v_max - x

answer = 0

if v_space <= v_max // 2:
    height = v_space * 2 / s
    tan_theta = height / a
else:
    aa = x * 2 / (a * b)
    tan_theta = b / aa

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

Solution (Python):
import sys
import math
from fractions import Fraction

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

y = Fraction(x / (a ** 2))

if y == b:
    print(0)
    sys.exit()

if b - 2 * y > 0:
    a = Fraction(2 * a * y / b)
    teihen = b
else:   
    teihen = 2 * (b - y)
res = Fraction(a / teihen)
print(90 - math.degrees(math.atan(res)))

Solution (Python):
import math

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

Solution (Python):
import math
a, b, x = map(int, input().split())
if x/(a**2) > b/2:
    tang = 2*((a**2)*b-x)/(a**3)
    ans = math.degrees(math.atan(tang))
elif  x/(a**2) == b/2:
    tang = 1
    ans = math.degrees(math.atan(tang))
elif x/(a**2) < b/2:
    tang = a*(b**2)/(2*x)
    ans = math.degrees(math.atan(tang))

print(ans)

Solution (Python):
import math
a,b,X = map(float,input().split())
T = math.atan(a/b)
if X <= a**2*b/2.0:
    c = 2*X/(a*b**2)
    theta = 90.0 -math.atan(c)*180/math.pi
else:
    Y = a**2*b-X
    theta = math.atan(2*Y/a**3)*180/math.pi
print(theta)

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

Solution (Python):
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b, x = na()
s = x/a
tri = a*b/2
if tri <= s:
    si = a * b - s
    print(math.degrees(math.atan(2 * si/a**2)))
else:
    print(90.0 - math.degrees(math.atan(2 * s/b**2)))

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

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

print(rad * 180 / math.pi)

Solution (Python):
import math

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

novo=2*x/(a*b)

tangente=b/novo


res= math.atan(tangente)*180/(math.pi)

if novo<=a:
	print("%.10f" %(res))

else:
	novo=2*x/(a*a)-b
	tangente=(b-novo)/a
	
	res= math.atan(tangente)*180/(math.pi)
	print("%.10f" %(res))

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

if __name__ == "__main__":
    f_d()

Solution (Python):
a, b, x = list(map(float, input().split()))

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

Solution (Python):
import math
a,b,x=map(int,input().split())
if x>=a*a*b/2:
  c=(-2*x/(a*a)+2*b)/a
else:
  c=(a*b*b)/(2*x)

asin=math.degrees(math.atan(c))
print(asin)

Solution (Python):
import numpy as np

a,b,x = (int(i) for i in input().split(' '))

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

if b-c>=0:
	theta = np.arctan2(c,a)
else:
	theta = np.arctan2(b,2*x/a/b,)

print(np.degrees(theta))

Solution (Python):
from math import atan, degrees
a, b, x = [int(i) for i in input().split()]
angle = None

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

print(angle)

Solution (Python):
import math
a,b,x=map(int,input().split())
y=2*(b-x/a/a)
th=math.asin(y/math.sqrt(y*y+a*a))*180/math.pi
if th>math.asin(b/math.sqrt(b*b+a*a))*180/math.pi:
    y=2*x/a/b
    th=math.asin(b/math.sqrt(y*y+b*b))*180/math.pi
print(th)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, atan, degrees
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
from bisect import bisect

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7
a, b, x = MAP()
y = 2*x/b/a
h = x/(a**2)
left = b-h

if x <= a*a*b/2:
    print(degrees(atan(b/y)))
else:
    print(degrees(atan(2*left/a)))

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

Solution (Python):
import math

a,b,x=map(int,input().split())
if x<a*a*b//2:
    q=math.degrees(math.atan(a*b*b/(2*x)))
else:
    q=math.degrees(math.atan(2*(a*a*b-x)/(a**3)))
print('{:.10f}'.format(q))

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

if 2*x/(a**2) > b:
    c = b- (2*x/(a**2) - b)
    rad = math.acos(a/math.sqrt(c**2 + a**2))
    deg = math.degrees(rad)
    ans = deg
else:
    c = 2*x/a/b
    h = b * c / math.sqrt(b**2 + c**2)
    rad = math.acos(h/b)
    deg = math.degrees(rad)
    ans = deg
    
print(ans)

Solution (Python):
import math

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

if h > (1/2) * b:
    ans = math.degrees(math.atan(2*(b-h)/a))
else:
    ans = 90 - math.degrees(math.atan(2*a*h/(b*b)))

print(ans)

Solution (Python):
from math import acos, degrees, sqrt

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

if(x == a * a * b / 2):
    print(degrees(acos(a / sqrt(a * a + b * b))))
elif(x < a * a * b / 2):
    a = (2 * x) / (a * b)
    print(degrees(acos(a / sqrt(a * a + b * b))))
else:
    z = 2 * (x - (a * a * b / 2)) / (a * a)
    b = b - z
    print(degrees(acos(a / sqrt(a * a + b * b))))

Solution (Python):
def main():
    import math
    a,b,x=map(int,input().split())
    v=a*a*b
    if x==v:
        print(0)
    elif x<v/2:
        h=2*x/(a*b)
        t=math.degrees(math.atan(h/b))
        print(90-t)
    else:
        h=2*(v-x)/(a*a)
        t=math.degrees(math.atan(h/a))
        print(t)
        
main()

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

Solution (Python):
import math

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

v = a * a * b

if 2 * x == v:
    print(math.degrees(math.atan2(a,b)))

elif 2 * x > v:
    print(math.degrees(math.atan2(2 * (v - x), a ** 3)))

else:
    w = v - x
    print(math.degrees(math.atan2(a * b * b, 2 * x)))

Solution (Python):
import math

A, B, X = map(int, input().split())
water = X / A 
bottle = A * B 
answer = 0
limit = A * B // 2
pour = bottle - water

if pour <= limit:
    answer = 90-math.degrees(math.atan2(A, pour * 2 / A))
else:
    answer = math.degrees(math.atan2(B, water * 2 / B))
print(answer)

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

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

Solution (Python):
import math

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

L = (a ** 2) * b

if L == x:
    print(0)
else:
    r = L - x
    if r <= L / 2:
        y = 2 * r / (a ** 2)
        print(math.degrees(math.acos(a / (math.sqrt(y ** 2 + a ** 2)))))
    else:
        y = 2 * x / (b * a)
        print(math.degrees(math.acos(y / (math.sqrt(y ** 2 + b ** 2)))))

Solution (Python):
import sys
import math
a, b, x = map(int, input().split())
rest = a * a * b - x

if rest == 0:
    print(0)
    sys.exit()

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

Solution (Python):
import math

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

if a*a*b==x:
    print(0)
elif (b*a*a)/2>=x:
    t=((2*x)/(a*b))
    s=b
    print(math.degrees(math.atan(s/t)))
else:
    s=(2*((a*a*b)-x))/(a**2)
    t=a
    print(90-math.degrees(math.atan(t/s)))

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

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

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

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


V = (a**2) * b

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

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

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

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

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

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

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

Solution (Python):
import math
a,b,x = map(int,input().split())
s = x / a
if s >= a*b/2:
    left = a*b-s
    si = (left * 2)/(a*a)
    ans = math.degrees(math.atan(si))
else:
    si = (2*s)/(b*b)
    ans = 90.0-math.degrees(math.atan(si))
print(ans)

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

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

Solution (Python):
import sys
import math
import os

input = sys.stdin.readline

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

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

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

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

height = x / (a ** 2)
side = a * height

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

Solution (Python):
import math
atan2 = math.atan2
pi = math.pi

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


halfAB = A * A * B / 2

if X >= halfAB:
    X = A*A*B - X
    t = X*2 / A / A
    
    resRad = atan2(t, A)
else:
    t = X*2 / A / B
    
    resRad = atan2(B, t)

print(resRad * 180.0 / pi)

Solution (Python):
import math

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

t = a*a*b

if x == t:
    theta = 90
elif x <= t*0.5:
    tan = 2*x/(a*b*b)
    theta = math.degrees(math.atan(tan))
else:
    tan = a*a*a/(2*(a*a*b - x))
    theta = math.degrees(math.atan(tan))

print(90 - theta)