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:
#!/usr/bin/env pypy
from __future__ import division, print_function
from collections import defaultdict, Counter, deque
from future_builtins import ascii, filter, hex, map, oct, zip
from random import randint
from itertools import imap as map, izip as zip, permutations, combinations, combinations_with_replacement
from __builtin__ import xrange as range
import math
from _continuation import continulet
from cStringIO import StringIO
from io import IOBase
import __pypy__
from bisect import bisect, insort, bisect_left, bisect_right
import sys
import os
import re
sys.setrecursionlimit(9999)
inf = float('inf')
mod = int(1e9) + 7
mod_ = 998244353
N = 5001
 
'''
Check for special cases (n=1)
One wrong submission = 10 mins penalty!
do smth instead of nothing and stay organized
'''

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

BUFSIZE = 8192
class FastI(IOBase):
	def __init__(self, file):
		self._fd = file.fileno()
		self._buffer = StringIO()
		self.newlines = 0
 
	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
		self.newlines = 0
		return self.buffer.read()
 
	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count("\n") + (not b)
			ptr = self._buffer.tell()
			self._buffer.seek(0, 2), self._buffer.write(
				b), self._buffer.seek(ptr)
		self.newlines -= 1
		return self._buffer.readline()
class FastO(IOBase):
	def __init__(self, file):
		self._fd = file.fileno()
		self._buffer = __pypy__.builders.StringBuilder()
		self.write = lambda s: self._buffer.append(s)
 
	def flush(self):
		os.write(self._fd, self._buffer.build())
		self._buffer = __pypy__.builders.StringBuilder()
def print(*args, **kwargs):
	sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop("end", "\n"))
	if kwargs.pop("flush", False):
		file.flush()
def gcd(x, y):
	while y:
		x, y = y, x % y
	return x
sys.stdin, sys.stdout = FastI(sys.stdin), FastO(sys.stdout)
def input(): return sys.stdin.readline().rstrip("\r\n")
if __name__ == "__main__":
	def bootstrap(cont):
		call, arg = cont.switch()
		while True:
			call, arg = cont.switch(to=continulet(
				lambda _, f, args: f(*args), call, arg))
	cont = continulet(bootstrap)
	cont.switch()
	main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import math
a,b,x = [int(x) for x in stdin.readline().rstrip().split()]
if a*a*b/2 > x:
    theta = (2*x)/(a*b*b)
    ans =  90 - math.degrees(math.atan(theta))
    print(ans)
else:
    theta = (2*b-2*x/(a*a))/a
    ans = math.degrees(math.atan(theta))
    print(ans)

Submission status: Accepted

Solution code:
from math import atan, degrees

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

v = a * a * b
if x <= v / 2:
    c = 2 * x / (a * b) # x = 1/2 * c * b * a
    theta = atan(b / c)
else:
    c = 2 * (v - x) / (a * a) # v - x = 1/2 * a * c * a
    theta = atan(c / a)

print(degrees(theta))

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

a,b,x = LI()

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

Submission status: Accepted

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

Submission status: Accepted

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

def cvt(val):
    return np.rad2deg(np.arctan(val))

if x > a*a*b/2:
    print(cvt((2*a*b-2*s)/(a*a))) # ??
else:
    print(cvt(b*b/(2*s)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def d_water_bottle():
    import math
    A, B, X = [int(i) for i in input().split()]

    rad = 2 * (A**2 * B - X) / A**3 if X >= A**2 * B / 2 else A * B**2 / (2 * X)
    ans = math.atan(rad)
    return round(math.degrees(ans), 10)

print(d_water_bottle())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

def search_rad_overhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        if a * a * math.tan(m) > (a * b - s) * 2.0:
            r = m
        else:
            l = m
    return l

def search_rad_underhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        if b * b * math.tan(m) > s * 2.0:
            r = m
        else:
            l = m
    return math.pi / 2.0 - l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2.0:
        # 半分未満の時
        rad = math.atan2(b * b, 2.0 * s)
        #rad = search_rad_underhalf(a, b, s)
    else:
        # 半分以上の時
        rad = math.atan2(2.0 * (b - s / a), a)
        #rad = search_rad_overhalf(a, b, s)
    return math.degrees(rad)

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

Submission status: Accepted

Solution code:
import math as m

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

z = a * b
s = x / a

if z / 2 >= s:
  ap = 2 * s / b
  at = m.degrees(m.atan(b/ap))
  print(at)
else:
  bp = 2 * (a * b - s) / a
  bt = m.degrees(m.atan(bp/a))
  print(bt)

Submission status: Accepted

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

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

Submission status: Accepted

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

if (a * a * b / 2) <= x:
  tan_ans = 2 * (a * a * b - x) / (a * a * a)
else:
  tan_ans = (a * b * b) / (2 * x)

ans = degrees(atan(tan_ans))

print(ans)

Submission status: Accepted

Solution code:
import math

def f(a, b, angle):
    if (a * math.tan(math.radians(angle))) <= b:
        return ((a * b) - (a * math.tan(math.radians(angle)) * a / 2.0)) * a
    else:
        return b * b / math.tan(math.radians(angle)) * a / 2.0

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

l, r = 0, 90
for i in range(1000):
    mid = (l+r) / 2.0
    if f(a, b, mid) < c:
        r = mid
    else:
        l = mid
print(l)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


def main():
    a, b, x = map(int, input().split())
    # 水平時の高さを求める
    h = x / a ** 2
    rad = 0
    if h >= (b / 2):
        # 高さが半分以上
        # 水のない三角形部分の高さを求める
        u = (a * a * b - x) * 2 / a ** 2
        rad = math.atan(u / a)
    else:
        # 高さが半分以下
        # 水部分の三角形の高さを求める
        u = x / (b * a) * 2
        rad = math.atan(b / u)
    # ラジアンから度数へ変換
    print(math.degrees(rad))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

import math
pi=math.acos(-1)
if v*2<a*a*b:
	h = v*2/a/b
	ans = math.atan2(b,h) * 180/pi
else:
	h=(a*a*b-v)*2/a/a
	ans = 90-math.atan2(a,h)*180/pi
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math as m

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

z = a ** 2 * b

if z / 2 >= x:
  ap = x * 2 / a / b
  at = m.degrees(m.atan(b/ap))
  print(at)
else:
  bp = b - x / (a ** 2)
  bt = m.degrees(m.atan(bp*2/a))
  print(bt)

Submission status: Accepted

Solution code:
import math
from decimal import *
a,b,x = map(Decimal,input().split())
two = Decimal("2")
three = Decimal("3")
if x >= a**2 * b /2:
  ans_theta =  math.degrees(math.atan2( two* (a**two*b -x),a**three  ))
else:
  ans_theta =  math.degrees(math.atan2(a*b**two,two*x))
print(ans_theta)

Submission status: Accepted

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

tmp = x/(a**2)
# tmp2 = x/(b**2)
tmp2 = (2*x)/(a*b)

if tmp2 < a:
    print(90-math.degrees(math.atan2(tmp2,b)))
else:
    #print(tmp)
    tmp3 = (2*b-((2*x)/(a*a)))
    #print(tmp3)
    print(90-math.degrees(math.atan2(a,tmp3)))

Submission status: Accepted

Solution code:
import math

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

s = x / a

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

Submission status: Accepted

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

if a*a*b/2 >= x:
    print(90-degrees(atan2(2*x,(a*b*b))))
else:
    print(90-degrees(atan2(a*a*a,2*(a*a*b-x))))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

#平面図形で考える
x /= a

# over half of bottle
if x <= a * b / 2:
	theta = np.arctan2(b * b, 2 * x)
# under half of bottle
else:
	theta = np.arctan2(2 * (a * b - x),a * a)

print(theta * 180 / np.pi)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int,input().split())
s = x / a
rad = 0
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)
PI = math.acos(-1)
deg = rad/(2*PI)*360
print(deg)

Submission status: Accepted

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

S = x/a

if S >= (a*b)/2:
    h = 2 * (a * b - S) / a
    print((atan2(h, a)/(2 * pi)) * 360)
else:
    print((atan2(b, 2*S/b))/(2*pi) * 360)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(theta)

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

theta = 360 * theta / (2 * math.pi)    
# theta = theta * (10 ** 7)
# theta = int(theta) + 1
# theta = theta / (10 ** 7)

print(theta)

Submission status: Accepted

Solution code:
import math

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

x /= a  # focus on the rectangle a * b

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

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(int, input().split()))
s = 0.5 * a * b
if x/a <= s:
    h = 2 * x / a / b
    ans = math.degrees(math.atan2(b, h))
else:
    h = 2 * (b - x / a / a)
    ans = math.degrees(math.atan2(h, a))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi

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

if x >= a * a * b / 2:
    print(atan((a*a*b-x)/(a*a*a/2))/(2 * pi)*360)
else:
    print(90 - atan(x/(a*b*b/2))/(2 * pi)*360)

Submission status: Accepted

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

vol = a * a * b

if x > vol / 2 :
    # print("水が台形")
    c = (2 * b) - (2 * x) / a ** 2 # 水でない三角形の底辺
    print(math.degrees(math.atan( c / a )))
else:
    # print("水が三角形")
    c = 2 * x / ( a * b ) # 水の三角形の底辺
    print(math.degrees(math.atan( b / c )))

Submission status: Accepted

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

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

Submission status: Accepted

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

#case
if x < a**2*b/2: #底ケース
	w = 2*x/(a*b)
	ans =math.degrees(math.atan(b/w))


else: #側面ケース
	now_h = (2*x)/(a**2) - b
	ans = math.atan((b-now_h)/a)
	ans = 180*ans/math.pi


print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

a,b,x = IL()

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

Submission status: Accepted

Solution code:
import math

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

print(ans)

Submission status: Accepted

Solution code:
from math import atan, pi

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

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

Submission status: Accepted

Solution code:
import math

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

sa = a ** 2
sb = a * b

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

volume = a**2*b

# 45度のとき
# a^2*b = 2*x
if volume > 2*x :
  side = 2*x/(a*b)
  print(math.degrees(math.atan(b/side)))
else :
  side = (2/(a**2))*(volume-x)
  print(math.degrees(math.atan(side/a)))

Submission status: Accepted

Solution code:
import math

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

jud = 2 * x / (a**2) - b
if jud > 0:
	ans = math.atan((b - jud) / a) * 180.0 / math.pi
else:
	h = x / a / b * 2
	ans = math.atan(b / h) * 180.0 / math.pi

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

# 台形部分の面積
m = x / a
# 水の高さ
w = m / b

# 台形を構成しているとき
w_max = 2 * m / a
max_deg = math.degrees(math.atan(2*(a*a*b -x)/ (a*a*a)))

# 台形から崩れたとき
h = 2 * m / b
max_deg2 = 90 - math.degrees(math.atan(h / b))

if (a * a * b / 2.0) <= x :
  print(max_deg)
else:
  print(max_deg2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(int,input().split())
c = b-(x/a**2)
d = (a*b)/2

if c <= b/2:
    print(np.degrees(np.arctan2(c,a/2)))
    
else:
    print(np.degrees(np.arctan2(b,(x/d))))

Submission status: Accepted

Solution code:
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

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

    print(const.convToDEG*(const.PI/2-math.atan(r)))

Submission status: Accepted

Solution code:
import math

A, B, x = map(int, input().split())
'''
if x == A ** 2 * B:
    print(0)
    exit()

if x <= A * A * B / 2:
    S = x / A
    print(S)
    print('----')
    f = 2 * S / B
    print(f)
    print('----')
    print(math.degrees(math.atan(B / f)))
else:
    S = A * B - x / A
    f = 2 * S /A
    print(90 - math.degrees(math.atan(A / f)))
#A,B,x = map(int,input().split())
'''


fukasa = x / A ** 2
mizu_menseki = fukasa * A
zentai_menseki = B * A
amari_menseki = zentai_menseki - mizu_menseki
amari_takasa  = amari_menseki  * 2 / A
mizu_soko = mizu_menseki * 2 / B


'''
print(mizu_soko * B * 0.5)
print(mizu_menseki)
print('----')
print(A,fukasa,mizu_menseki,zentai_menseki,amari_menseki,amari_takasa,mizu_soko)

print('----')

print(math.atan2(1,3 ** 0.5))
print(math.degrees(math.atan2(1,3 ** 0.5)))

'''

if (A * A * B // 2) == x:
    print(45)
elif (A * A * B / 2) < x:
    print(math.degrees(math.atan(amari_takasa/A)))
else:
    print(math.degrees(math.atan(B/mizu_soko)))

'''
taikakusen = A * 2**0.5
fukasa = x / A ** 2
mizu_menseki = fukasa * taikakusen
zentai_menseki = B * taikakusen
amari_menseki = zentai_menseki - mizu_menseki
amari_takasa  = amari_menseki  / (taikakusen * 0.5)
mizu_soko = mizu_menseki / (B * 0.5)

print(mizu_soko * B * 0.5)
print(mizu_menseki)
print('----')
print(taikakusen,fukasa,mizu_menseki,zentai_menseki,amari_menseki,amari_takasa,mizu_soko)

print('----')

print(math.atan2(1,3 ** 0.5))
print(math.degrees(math.atan2(1,3 ** 0.5)))

if (A * A * B // 2) == x:
    print(45)
    print(math.degrees(math.atan2(amari_takasa,taikakusen)))
elif (A * A * B / 2) > x:
    print(math.degrees(math.atan2(amari_takasa,taikakusen)))
else:
    print(90 - math.degrees(math.atan2(mizu_soko,B)))
'''

Submission status: Accepted

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

Submission status: Accepted

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

s=x/a

import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
 
def solv(a, b, x):
    if x == a ** 2 * b:
        return 0
    elif x <= a**2 * b / 2:
        tanTheta = (2 * x) / (a * b ** 2)
    else:
        tanTheta = (a ** 3) / (2 * (a ** 2 * b - x))
    return 90 - math.degrees(math.atan(tanTheta))
 
a, b, x = map(int, input().split(" "))
print(solv(a, b, x))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
 
def solv(a, b, x):
    if x == a ** 2 * b:
        return 0
    elif x <= a**2 * b / 2:
        tanTheta = (2 * x) / (a * b ** 2)
        return 90 - math.degrees(math.atan(tanTheta))
    else:
        tanTheta = (2 * (a ** 2 * b - x)) / (a ** 3)
        return math.degrees(math.atan(tanTheta))
 
a, b, x = map(int, input().split(" "))
print(solv(a, b, x))

Submission status: Accepted

Solution code:
from math import atan, pi

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

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

Submission status: Accepted

Solution code:
import math

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


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

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
full = a*a*b
ans = 0
if x == full:
    ans = 0
elif x<=full/2:
    c = (2*x)/(a*b)
    d = math.sqrt(b**2+c**2)
    cosB = (c**2+d**2-b**2)/(2*c*d)
    acosB = math.degrees(math.acos(cosB))
    ans = acosB
else:
    c = 2*x/a**2-b
    c2 = b-c
    d = math.sqrt(a**2+c2**2)
    cosA = (c2**2+d**2-a**2)/(2*c2*d)
    acosA = math.degrees(math.acos(cosA))
    ans = 90-acosA
print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

def judge(theta, a, b, V):
  theta_rad = math.radians(theta)
  tan = math.tan(theta_rad)
  y = (V - a**3*tan/2)/a**2
  if y >= 0.:
    if y+a*tan <= b:
      return True
    else:
      return False
  else:
    z = math.sqrt(V/tan/a*2)
    if z*tan <= b:
      return True
    else:
      return False

theta_eval = [0., 89.9999999999]

while theta_eval[1]-theta_eval[0] >= 1e-7:
  delta = [1.0, 1.0]
  while judge(theta_eval[0]+delta[0], a, b, V) == False or theta_eval[0]+delta[0] >= theta_eval[1]:
    delta[0] = delta[0]/2
  while judge(theta_eval[1]-delta[1], a, b, V) == True:
    delta[1] = delta[1]/2
  theta_eval[0] += delta[0]
  theta_eval[1] -= delta[1]

print(theta_eval[0])

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

def Main(a, b, x):
    h = x / (a*a)
    r = 0
    if(h >= b/2):
        r = math.atan2(b-h, a/2)
    else:
        y = 2*x/(a*b)
        r = math.atan2(b,y)
    return math.degrees(r)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import atan, degrees

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


if __name__ == '__main__':
    d()

Submission status: Accepted

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

print(p)

Submission status: Accepted

Solution code:
import math


a, b, x = map(int, input().split())
r = 180 / math.pi
h = x / a ** 2
c = h * 2 - b
d = 2 * x / (a * b)
if h >= b / 2:
    th = math.atan((h - c) / (a / 2)) * r
else:
    th = ((math.pi / 2) - math.atan((d / b))) * r
print(th)

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

L3 = b * (a**2)
x2  = L3 - x

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

Submission status: Accepted

Solution code:
#import sys

#input = sys.stdin.readline
import math
#import bisect

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


def main():
#    h,w,a,b = map(int, input().split())
    a,b,x=map(int,input().split())


    t1=math.atan(2*(a*a*b-x)/a/a/a)
    t2=math.atan(b/a)
    t3=math.atan(a*b*b/2/x)

    if x>=a*a*b/2:
        print(math.degrees(t1))
    else:
        print(math.degrees(t3))




if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np


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

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

Submission status: Accepted

Solution code:
def main():
    from math import atan, degrees
    a, b, x = (int(i) for i in input().split())
    if x/a >= a*b/2:
        tmp = (2*b - ((2*x)/(a*a))) / a
        print(degrees(atan(tmp)))
    else:
        tmp = b/((x/a)*(2/b))
        k = atan(tmp)
        print(degrees(k))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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