AtCoder Beginner Contest 144 - Water Bottle

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-----
2 2 4

-----Sample Output-----
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.

Source: atcoder | Difficulty: MEDIUM_HARD


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


from math import *
(a, b, x) = map(int, input().split())
x = x / a
if x <= a * b / 2:
	t = 2 * x / b
	c = sqrt(b ** 2 + t ** 2)
	ans = 90 - degrees(asin(t / c))
else:
	t = 2 * (a * b - x) / a
	c = sqrt(a ** 2 + t ** 2)
	ans = 90 - degrees(asin(a / c))
print(ans)


def main():
	import math
	import sys
	pin = sys.stdin.readline
	pout = sys.stdout.write
	perr = sys.stderr.write
	(a, b, x) = map(int, pin().split())
	if 2 * x > a * a * b:
		print(math.degrees(math.atan((2 * b * a * a - 2 * x) / (a * a * a))))
	else:
		print(math.degrees(math.atan(a * b * b / (2 * x))))
	return
main()


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


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


import numpy
(a, b, x) = list(map(int, input().split()))
if a * b / 2 < x / a:
	theta = numpy.arctan(2 * (b / a - x / a ** 3))
else:
	theta = numpy.arctan(a * b ** 2 / 2 / x)
theta = numpy.rad2deg(theta)
print(theta)


from math import gcd
from itertools import combinations, permutations, accumulate, product
from collections import deque, defaultdict, Counter
import decimal
import re
import math
import bisect
import heapq
import sys
sys.setrecursionlimit(10000000)
mod = 10 ** 9 + 7
INF = float('inf')
from sys import stdin
readline = stdin.readline

def readInts():
	return list(map(int, readline().split()))

def readTuples():
	return tuple(map(int, readline().split()))

def I():
	return int(readline())
(a, b, x) = readInts()
x /= a
import math
PI = math.pi
if x > a * b // 2:
	print('{:.10}'.format(math.atan2((a * b - x) * 2, a * a) * 180 / PI))
else:
	print('{:.10}'.format(math.atan2(b * b, x * 2) * 180 / PI))


import math
(a, b, x) = [int(i) for i in input().split()]
if a ** 2 * b / 2 <= x:
	y = 2 * x / a ** 2 - b
	tntheta = (b - y) / a
else:
	y = a - 2 * x / (a * b)
	tntheta = b / (a - y)
print(math.degrees(math.atan(tntheta)))


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


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


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


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


import math

def main():
	(a, b, x) = list(map(int, input().split()))
	if a * a * b == x:
		print(0)
		return
	mid = a ** 2 * b / 2
	c = x / a ** 2
	if mid == x:
		ans = 90 - math.degrees(math.atan(a / b))
	elif mid < x:
		d = 2 * x / a ** 2 - b
		ans = 90 - math.degrees(math.atan(a / (b - d)))
	else:
		d = 2 * a * c / b
		ans = 90 - math.degrees(math.atan(d / b))
	print(ans)

def __starting_point():
	main()
__starting_point()


import math
from math import gcd, pi, sqrt
INF = float('inf')
import sys
sys.setrecursionlimit(10 ** 6)
import itertools
from collections import Counter, deque

def i_input():
	return int(input())

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

def i_list():
	return list(i_map())

def i_row(N):
	return [i_input() for _ in range(N)]

def i_row_list(N):
	return [i_list() for _ in range(N)]

def s_input():
	return input()

def s_map():
	return input().split()

def s_list():
	return list(s_map())

def s_row(N):
	return [s_input for _ in range(N)]

def s_row_str(N):
	return [s_list() for _ in range(N)]

def s_row_list(N):
	return [list(s_input()) for _ in range(N)]

def main():
	(a, b, x) = i_map()
	if a * a * b < x * 2:
		water_y = x / a ** 2
		left_y = b - water_y
		half_x = a / 2
		d = math.degrees(math.atan(left_y / half_x))
		print(d)
	else:
		c = x * 2 / (a * b)
		c = math.degrees(math.atan(b / c))
		print(c)

def __starting_point():
	main()
__starting_point()


from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(500000)
INF = float('inf')
(YES, Yes, yes, NO, No, no) = ('YES', 'Yes', 'yes', 'NO', 'No', 'no')
(dy4, dx4) = ([0, 1, 0, -1], [1, 0, -1, 0])
(dy8, dx8) = ([0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1])

def inside(y, x, H, W):
	return 0 <= y < H and 0 <= x < W

def ceil(a, b):
	return (a + b - 1) // b

def sum_of_arithmetic_progression(s, d, n):
	return n * (2 * s + (n - 1) * d) // 2

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	g = gcd(a, b)
	return a / g * b
import math

def solve():
	(A, B, X) = list(map(int, input().split()))
	X /= A
	if X > A * B / 2:
		rest = A * B - X
		h = 2 * rest / A
		r = math.atan(h / A)
		print(math.degrees(r))
	else:
		h = 2 * X / B
		r = math.atan(B / h)
		print(math.degrees(r))

def main():
	solve()

def __starting_point():
	main()
__starting_point()


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


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


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


from math import atan, degrees

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


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


import math
(a, b, x) = map(float, input().split())
volume = a ** 2 * b
if volume < x * 2:
	sub = volume - x
	sub = sub / a * 2 / a
	ans = math.degrees(math.atan(sub / a))
else:
	x = x / a * 2 / b
	ans = 90.0 - math.degrees(math.atan(x / b))
print(ans)


from math import pi, tan, atan, degrees
(a, b, x) = [int(i) for i in input().split()]
theta = pi * 0.5 - atan(2 * x / (a * b ** 2))
if b * tan(pi * 0.5 - theta) <= a:
	print(degrees(theta))
else:
	theta = atan(2 * b / a - 2 * x / a ** 3)
	print(degrees(theta))


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


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


from math import *
(A, B, X) = map(int, input().split())
V = A * A * B
if V / 2 < X:
	print(degrees(atan(2 * (V - X) / A ** 3)))
else:
	print(degrees(atan(A * B * B / 2 / X)))


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


import math
(a, b, x) = map(int, input().split())
L = b * a ** 2
if L == x:
	alfa = 0
elif x >= L / 2:
	h = x / a ** 2
	beta = math.atan(a / 2 / (b - h))
	alfa = math.pi / 2 - beta
else:
	alfa = math.atan(b / (2 * x / (a * b)))
print(math.degrees(alfa))


import math
(a, b, x) = map(int, input().split())
v1 = math.degrees(math.atan(a * b * b / (2 * x)))
v2 = math.degrees(math.atan((2 * a * a * b - 2 * x) / (a * a * a)))
if a * a * b / 2 > x:
	print('{:.7f}'.format(v1))
else:
	print('{:.7f}'.format(v2))


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


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


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

def f(a, b, deg):
	theta = math.radians(deg)
	if b * math.tan(math.pi / 2 - theta) <= a:
		return b * b * math.tan(math.pi / 2 - theta) * a / 2
	else:
		return a * a * b - a * a * math.tan(theta) * a / 2
l = 0
r = 90
while r - l >= 10 ** (-6):
	mid = (l + r) / 2
	if x - 10 ** (-6) <= f(a, b, mid) <= x + 10 ** (-6):
		print(mid)
		return
	if f(a, b, mid) > x:
		l = mid
	else:
		r = mid
print(l)


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


import math

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


import math
(a, b, x) = [int(r) for r in input().split(' ') if len(r) > 0]
if 2 * x >= a * a * b:
	print(90 - math.degrees(math.atan2(a, 2 * (b - x / a ** 2))))
else:
	print(90 - math.degrees(math.atan2(2 * x / (a * b), b)))


import sys
from math import *
input = sys.stdin.readline
(a, b, x) = list(map(int, input().split()))
s = x / a
if s > a * b / 2:
	sankaku = a * b - s
	h = (a * b - s) * 2 / a
	print(degrees(atan(h / a)))
else:
	w = 2 * s / b
	print(degrees(atan(b / w)))


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal
import functools

def v():
	return input()

def k():
	return int(input())

def S():
	return input().split()

def I():
	return map(int, input().split())

def X():
	return list(input())

def L():
	return list(input().split())

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 6)
mod = 10 ** 9 + 7
cnt = 0
ans = 0
inf = float('inf')
al = 'abcdefghijklmnopqrstuvwxyz'
AL = al.upper()
(a, b, x) = I()
if a ** 2 * b <= 2 * x:
	c = 2 * (a ** 2 * b - x) / a ** 3
else:
	c = a * b ** 2 / (2 * x)
print(math.degrees(math.atan(c)))


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


import math

def f(d):
	theta = d * math.pi / 180
	if a * math.tan(theta) <= b:
		return a * a * b - a * a * a * math.tan(theta) / 2
	else:
		return a * b * b / (2 * math.tan(theta))
(a, b, x) = map(int, input().split())
(l, r) = (0.0, 90.0)
for i in range(1000):
	m = (l + r) / 2
	if f(m) <= x:
		r = m
	else:
		l = m
print('{0:.10f}'.format(l))


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


(a, b, x) = map(int, input().split())
import math
if x <= a ** 2 * b / 2:
	n = 2 * x / (a * b)
	ans = math.acos(n / math.sqrt(b ** 2 + n ** 2))
else:
	n = 2 * b - 2 * x / a ** 2
	ans = math.acos(a / math.sqrt(a ** 2 + n ** 2))
print(math.degrees(ans))


import math
[a, b, x] = [int(i) for i in input().split()]
if x <= a ** 2 * b / 2:
	t = a * b ** 2 / (2 * x)
	theta = math.atan(t)
else:
	t = 2 * b / a - 2 * x / a ** 3
	theta = math.atan(t)
print(math.degrees(theta))


import math
(a, b, x) = list(map(int, input().split()))
full = a * a * b
if x > full / 2:
	x = full - x
	tan_x = 2.0 * x / (a * a) / a
	print(math.atan(tan_x) / math.pi * 180.0)
else:
	tan_x = 2.0 * x / (a * b) / b
	print(90 - math.atan(tan_x) / math.pi * 180.0)


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


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


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


import math

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


import math

def at(n):
	return math.degrees(math.atan(n))

def main():
	(a, b, x) = [int(p) for p in input().split(' ')]
	V = a * a * b
	if x < V / 2:
		print(at(a * b * b / (2 * x)))
	else:
		print(at(2 * (a * a * b - x) / a ** 3))
main()


import math
(a, b, x) = map(int, input().split())
h = x / a / a
r = b - h
t = 2 * r / a if h >= b / 2 else a * b * b / 2 / x
print(math.degrees(math.atan(t)))


import math
(a, b, x) = map(int, input().split())
if x >= a ** 2 * b / 2:
	a = math.atan(2 / a * (b - x / a ** 2))
else:
	a = math.atan(a * b ** 2 / 2 / x)
print('{:.8f}'.format(a * (180 / math.pi)))


import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
mod = 10 ** 9 + 7
INF = 10 ** 18
eps = 10 ** (-7)
(a, b, x) = map(int, input().split())
v = a * a * b - x
maxh = v / (a * a) * 2
import math
if maxh <= b:
	print(math.degrees(math.atan(maxh / a)))
else:
	maxh = 2 * x / (a * b)
	print(math.degrees(math.atan(b / maxh)))


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


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


from math import pi
from math import atan2
(a, b, x) = map(float, input().split())
ans = 0
x /= a
if x > a * b / 2:
	ans = atan2((a * b - x) * 2, a * a) * 180 / pi
else:
	ans = atan2(b * b, x * 2) * 180 / pi
print(ans)


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


from math import pi
from math import atan2
(a, b, x) = map(int, input().split())
x /= a
if x > a * b / 2:
	print(atan2(2 * (a * b - x), a ** 2) * 180 / pi)
if x <= a * b / 2:
	print(atan2(b ** 2, 2 * x) * 180 / pi)


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


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


import math
(a, b, x) = list(map(int, input().split()))
s = x / a
half = a * b / 2
if s <= half:
	y = 2 * s / b
	z = math.sqrt(b ** 2 + y ** 2)
	alpha = b / z
	alpha = math.asin(alpha)
	alpha = math.degrees(alpha)
	print(alpha)
if s > half:
	z = math.sqrt(b ** 2 + a ** 2)
	alpha = b / z
	alpha = math.asin(alpha)
	alpha = math.degrees(alpha)
	beta = a / z
	beta = math.asin(beta)
	beta = math.degrees(beta)
	l = 2 * (s - half) / (math.sin(math.radians(90 - alpha)) * z)
	k = math.sqrt(z ** 2 + l ** 2 - 2 * l * z * math.cos(math.radians(90 - alpha)))
	gamma = 2 * (s - half) / (k * z)
	gamma = math.asin(gamma)
	gamma = math.degrees(gamma)
	print(90 - (gamma + beta))


import math

def main():
	(a, b, x) = map(int, input().split())
	ans = 0
	if 2 * x >= a ** 2 * b:
		ans = math.atan((x / a - a * b) * (-2 / a ** 2)) * 180 / math.pi
	else:
		ans = math.atan(a * b ** 2 / (2 * x)) * 180 / math.pi
	print(ans)

def __starting_point():
	main()
__starting_point()


import numpy as np
(a, b, x) = map(int, input().split())
if x == a ** 2 * b:
	print(0)
	return
if x < 1 / 2 * b * a ** 2:
	a1 = 2 * x / (a * b)
	rad = np.arctan(a1 / b)
else:
	y = 2 * (b - x / a ** 2)
	rad = np.arctan(a / y)
print(90 - rad * 180 / np.pi)


import math
(a, b, x) = map(int, input().split())
y = a ** 2 * b
h = x / a ** 2

def get_angle_from_sides(a, b, c):
	return math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))

def checkio(a, b, c):
	try:
		angles = [get_angle_from_sides(*abc) for abc in ((a, b, c), (b, c, a), (c, a, b))]
		result = sorted((math.degrees(a) for a in angles))
		return [0, 0, 0] if 0 in result else result
	except ValueError:
		return [0, 0, 0]
count = 0
if y == x:
	pass
elif y / 2 <= x:
	if a >= 2 * (b - h):
		m = checkio(a, 2 * (b - h), math.sqrt(a ** 2 + (2 * (b - h)) ** 2))
		count = m[0]
	elif a < 2 * (b - h):
		m = checkio(a, 2 * (b - h), math.sqrt(a ** 2 + (2 * (b - h)) ** 2))
		count = m[1]
elif y / 2 > x:
	z = 2 * x / (a * b)
	if b >= z:
		m = checkio(b, z, math.sqrt(b ** 2 + z ** 2))
		count = m[1]
	elif b < z:
		m = checkio(b, z, math.sqrt(b ** 2 + z ** 2))
		count = m[0]
print(count)


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


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


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


import math
pi = math.pi

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


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


import numpy
(a, b, x) = list(map(int, input().split()))
V = a * a * b
if x <= V / 2:
	y = 2 * x / b / a
	theta = numpy.arctan(b / y)
	print(theta * 360 / 2 / numpy.pi)
else:
	x = V - x
	y = 2 * x / a / a
	theta = numpy.arctan(y / a)
	print(theta * 360 / 2 / numpy.pi)


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


import math
(a, b, x) = map(int, input().split())
t = lambda y, x: math.atan2(y, x) / math.pi * 180
print(t(b - x / a / a, a / 2) if a * a * b / 2 < x else t(b, x * 2 / a / b))


import math
(a, b, x) = list(map(int, input().split()))
d = a * a * b
if x * 2 > d:
	x = d - x
	xx = 2 * x / (a * a * a)
	theta = math.atan(xx)
	print(theta * 180 / math.pi)
else:
	xx = 2 * x / (a * b * b)
	theta = math.atan(xx)
	print(90 - theta * 180 / math.pi)


import sys
import math
from io import StringIO
import unittest

def yn(b):
	print('Yes' if b == 1 else 'No')
	return

def resolve():
	readline = sys.stdin.readline
	(a, b, x) = list(map(int, readline().rstrip().split()))
	if x <= a * a * b / 2:
		l = x * 2 / b / a
		print(math.degrees(math.atan(b / l)))
		return
	l = 2 * x / (a * a) - b
	print(math.degrees(math.atan((b - l) / a)))
	return
if 'doTest' not in globals():
	resolve()
	return


from math import *
(a, b, x) = map(int, input().split())
print(atan(a * b * b / 2 / x * (x < a * a * b / 2) or (b / a - x / a ** 3) * 2) / pi * 180)


import math
(a, b, x) = list(map(int, input().split()))
s = x / a
if s >= a * b / 2:
	h = (a * b - s) * 2 / a
	rad = math.atan2(h, a)
else:
	w = s * 2 / b
	rad = math.atan2(b, w)
print(rad / (2 * math.pi) * 360)


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


from math import atan, degrees

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

def __starting_point():
	main()
__starting_point()


from math import tan, atan2, pi, degrees

def f(theta):
	if theta < thres:
		return V - a ** 3 * tan(theta) / 2
	else:
		return a * b * b / tan(theta) / 2
eps = 1e-09
(a, b, x) = list(map(int, input().split()))
V = a * a * b
thres = atan2(b, a)
(bad, good) = (pi / 2, 0)
while bad - good > eps:
	mid = (bad + good) / 2
	if f(mid) >= x:
		good = mid
	else:
		bad = mid
print(degrees(good))


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


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


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


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


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


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


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


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


import math

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

def __starting_point():
	main()
__starting_point()


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


import math
(a, b, x) = list(map(int, input().split()))
ans = 0
if a ** 2 * b < 2 * x:
	ans = math.degrees(math.atan2(2 * (a ** 2 * b - x), a ** 3))
else:
	ans = math.degrees(math.atan2(a * b ** 2, 2 * x))
print(ans)


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


import math
(a, b, x) = map(int, input().split())
v = a ** 2 * b
d = 0
if x < v / 2:
	d = math.atan2(b, x * 2 / a / b)
else:
	d = math.atan2((v - x) * 2 / a / a, a)
print(math.degrees(d))


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


import math
(a, b, x) = [int(n) for n in input().split()]
v = a ** 2 * b / 2
if v == x:
	theta = math.atan(b / a)
elif v > x:
	theta = math.atan(a * b ** 2 / (2 * x))
elif v < x:
	theta = math.atan(2 / a * (b - x / a ** 2))
print(math.degrees(theta))


import math as m
(a, b, x) = map(int, input().split())
x /= a
P = m.acos(-1.0)
if x > a * b / 2:
	print(m.atan2((a * b - x) * 2, a * a) * 180 / P)
else:
	print(m.atan2(b * b, x * 2) * 180 / P)


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)


import math

def resolve():
	(a, b, x) = map(int, input().split())
	met = a ** 2 * b / 2
	if x > met:
		y = 2 * b - 2 * x / a ** 2
		ans = math.atan2(y, a)
	elif x == met:
		ans = math.pi / 4
	else:
		y = 2 * x / a / b
		ans = math.pi / 2 - math.atan2(y, b)
	print(math.degrees(ans))
resolve()


import math
(a, b, x) = [int(_) for _ in input().split()]
h = x / a / a
if a * b / 2 < a * h:
	theta = math.atan(2 * (b - h) / a)
else:
	theta = math.atan(b * b / a / h / 2)
ans = math.degrees(theta)
print(ans)


import math
(a, b, x) = list(map(int, input().split()))
sq = a * a * b / 2
if sq >= x:
	A1 = 2 * x / (a * b)
	num = math.atan(b / A1)
else:
	B1 = 2 * x / a ** 2 - b
	num = math.atan((b - B1) / a)
print(math.degrees(num))


import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque, Counter
from decimal import Decimal
import functools

def v():
	return input()

def k():
	return int(input())

def S():
	return input().split()

def I():
	return map(int, input().split())

def X():
	return list(input())

def L():
	return list(input().split())

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

def lcm(a, b):
	return a * b // math.gcd(a, b)
sys.setrecursionlimit(10 ** 6)
mod = 10 ** 9 + 7
cnt = 0
ans = 0
inf = float('inf')
al = 'abcdefghijklmnopqrstuvwxyz'
AL = al.upper()
(a, b, x) = I()
if a ** 2 * b <= 2 * x:
	ama = a ** 2 * b - x
	ran = 2 * ama / a ** 2
	print(90 - 180 / math.pi * math.atan2(a, ran))
else:
	ran = 2 * x / (a * b)
	print(90 - 180 / math.pi * math.atan2(ran, b))


import math

def slv(n, m):
	return math.tan(n) * m * m / 2
(a, b, x) = map(int, input().split())
c = a * a / 2
ang = 0.5 * math.pi
sang = ang
if x > c * b:
	x = a * a * b - x
	for i in range(1000):
		if slv(ang, a) * a > x:
			ang -= sang / 2 ** (i + 1)
		else:
			ang += sang / 2 ** (i + 1)
	print(math.degrees(ang))
else:
	for i in range(1000):
		if slv(ang, b) * a > x:
			ang -= sang / 2 ** (i + 1)
		else:
			ang += sang / 2 ** (i + 1)
	print(math.degrees(math.pi / 2 - ang))


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


import numpy as np
(a, b, x) = map(int, input().split())
if x >= a ** 2 * b / 2:
	ans = np.arctan(2 * (b - x / a ** 2) / a)
else:
	ans = np.arctan(a * b / 2 / x * b)
print(ans * 180 / np.pi)


import math
(a, b, x) = map(int, input().split())
PI = 3.14159265
if x >= a * a * b / 2:
	ans = math.atan(2 * (a * a * b - x) / a ** 3) * 180 / PI
else:
	ans = math.atan(a * b * b / (2 * x)) * 180 / PI
print(ans)


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


import math

def LI():
	return list(map(int, input().split()))
(a, b, x) = LI()
if x == a ** 2 * b / 2:
	ans = 45
elif x > a ** 2 * b / 2:
	ans = math.degrees(math.atan(2 * (b - x / a ** 2) / a))
else:
	ans = math.degrees(math.atan(a * b ** 2 / (2 * x)))
print(ans)