Problem:


Score : 400 points

Problem Statement

Takahashi has a water bottle with the shape of a rectangular prism whose base is a square of side a~\mathrm{cm} and whose height is b~\mathrm{cm}. (The thickness of the bottle can be ignored.)

We will pour x~\mathrm{cm}^3 of water into the bottle, and gradually tilt the bottle around one of the sides of the base.

When will the water be spilled? More formally, find the maximum angle in which we can tilt the bottle without spilling any water.

Constraints

All values in input are integers.

1 \leq a \leq 100

1 \leq b \leq 100

1 \leq x \leq a^2b

Input

Input is given from Standard Input in the following format:

a b x

Output

Print the maximum angle in which we can tilt the bottle without spilling any water, in degrees.
Your output will be judged as correct when the absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

2 2 4

Sample Output 1

45.0000000000

This bottle has a cubic shape, and it is half-full. The water gets spilled when we tilt the bottle more than 45 degrees.

Sample Input 2

12 21 10

Sample Output 2

89.7834636934

This bottle is almost empty. When the water gets spilled, the bottle is nearly horizontal.

Sample Input 3

3 1 8

Sample Output 3

4.2363947991

This bottle is almost full. When the water gets spilled, the bottle is still nearly vertical.



Sample input:
2 2 4


Sample output:
45.0000000000

Submission status: Accepted

Solution code:
import math
a, b, x = [int(x) for x in input().split()]
y = 2 * (b - (x / (a * a)))
if x == a * a * b: print(0)
elif y <= b:
    value = a / y
    print(90 - math.degrees(math.atan(value)))
else:
    y = (2 * x) / (a * b)
    v = b / y
    print(math.degrees(math.atan(v)))

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest
import math


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

    tan_theta = 2*(b/a-x/math.pow(a, 3))
    tan_theta2 = a * pow(b, 2) / (2 * x)

    if math.pow(a, 3) / 2 * tan_theta < x:
        theta = math.atan(tan_theta)
    else:
        theta = math.atan(tan_theta2)

    print(math.degrees(theta))


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2 4"""
        output = """45.0000000000"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """12 21 10"""
        output = """89.7834636934"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3 1 8"""
        output = """4.2363947991"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

v_max = a * a * b
v_emp = a * a * b - x

if v_emp < v_max / 2:
    tan = 2 * v_emp / (a ** 3)
else:
    tan = a * b * b / (2 * x)

import math
deg = math.degrees(math.atan(tan))

print(deg)

Submission status: Accepted

Solution code:
import math

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

H = x / (a**2)
nokori = b - H

sa = nokori * 2
# (y, x)
ans = math.degrees(math.atan2(sa, a))
if H * 2 >= b:
    print(ans)
else:
    # print(H)
    men = H*a
    # print(men)
    _x = men * 2 / b
    # print(_x)
    ans = math.degrees(math.atan2(b, _x))
    print(ans)
    # print('o')

Submission status: Accepted

Solution code:
import math
a,b,x = list(map(int,input().split()))
height = x / (a**2)
margin = b-height
squaremargin = margin*a
if squaremargin <= a*b/2:
        tiltedmargin = squaremargin/a*2
        rad = math.atan(tiltedmargin/a)
else:
        tiltedmargin = squaremargin*2/b-a
        rad = math.atan(b/(a-tiltedmargin))
print(rad*(180/3.141592653589793238))

Submission status: Accepted

Solution code:
import math
a, b, x = list(map(float, input().split()))
if x/a >= 0.5 * a * b:
    area = (a * b) - (x/a)
    c = 2 * area / a
    d = (a ** 2 + c ** 2) ** (1/2)
    angle = math.asin(c/d)
    angle = math.degrees(angle)
else:
    area = (x/a)
    c = 2 * area /b
    d = (b ** 2 + c ** 2) ** (1/2)
    angle_k = math.asin(c/d)
    angle_k = math.degrees(angle_k)
    angle = 90- angle_k
print(angle)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if (a**2 * b - x) == 0:
        ans = 0.0
    elif y >= a*b/2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
a, b, x = map(int,input().split())

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

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

org_S = x/a

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

Submission status: Accepted

Solution code:
import math

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

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


print(theta*180/math.pi)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(theta)

Submission status: Accepted

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

Submission status: Accepted

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

if x >= a*a*b/2:
    y = (-1)*b + 2*x/(a**2)
    if b != y:
        d = math.atan(a / (b-y))
    else:
        print(0)
        exit()
else:
    y = 2*x/(a*b)
    d = math.atan(y/b)
print(90 - math.degrees(d))

Submission status: Accepted

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

S = x / a
half = a * b / 2

if S > half:
  S = a * b - S
  y = math.atan(2*S/(a*a))
else:
  y = math.atan(b*b/(2*S))

print(math.degrees(y))

Submission status: Accepted

Solution code:
input = str(input()).split(" ")
input = [int(x) for x in input]

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

import math

##check situation
height = x/a/a
if height <= b/2:
    teihen_height = 2*x/a/b
    print(math.degrees(math.atan(b/teihen_height)))
elif height == b:
    print(0)
else:
    nokori_height = b - height
    print(90-math.degrees(math.atan(0.5*a/nokori_height)))

Submission status: Accepted

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

V=a**2*b
if x==V:
    print('{:.10f}'.format(0))
elif x<=V/2:
    alpha=np.arctan(2*x/a/b**2)
    angle=90-alpha/np.pi*180
    print('{:.10f}'.format(angle))
else:
    angle=90-np.arctan(a**3/2/(a**2*b-x))/np.pi*180
    print('{:.10f}'.format(angle))

Submission status: Accepted

Solution code:
import math

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

V = a**2*b

if x > V/2:
  Va = V - x
  res = 2*Va/(a**2)
  deg = math.atan(res/a)

else:
  Va = x
  res = 2*Va/(a*b)
  deg = math.atan(b/res)

deg = math.degrees(deg)

print(deg)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

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

print('{:.10f}'.format(res))

Submission status: Accepted

Solution code:
import math

c = list(map(float, input().split()))
a = c[0]
b = c[1]
x = c[2]
if x <= a * a * b / 2.0:
  print(90.0 - math.atan((x / a * 2.0 / b) / b) * 180.0 / math.pi)
else:
  print(math.atan(((a * a * b - x) / a * 2.0 / a) / a) * 180.0 / math.pi)

Submission status: Accepted

Solution code:
from math import atan,pi
import sys
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

Solution code:
import time
import math
a,b,x = map(int,input().split())
x /= a
c = a*b/2
if x<c:
    l,r = 0,90
    for i in range(1000):
        mid = (l+r)/2
        S = b*b*math.tan(math.radians(mid))/2
        if S<=x: l = mid
        else: r = mid
    print(90-mid)
elif x==c:
    print(math.degrees(math.atan(a/b)))
else:
    l,r = 0,90
    for i in range(1000):
        mid = (l+r)/2
        S = a*b-a*a/math.tan(math.radians(mid))/2
        if S<=x: l = mid
        else: r = mid
    print(90-mid)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# abc144/abc144_d
import sys
from math import *

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    a, b, x = i2nn()
    if 2 * x > a * a * b:
        r = atan(2 / a**2 * (a * b - x / a))
    else:
        r2 = atan(2 * x / (a * b * b))
        r = pi / 2 - r2
    print(r / pi * 180)
    return

main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
from functools import reduce




a, b, x = map(int, input().split())
total = a * a * b
def get_vol(vals, x, y):
    return vals * 2.0 / (x * y)

if x == total:
    print(0.0)
elif x > total // 2:
    h = get_vol(total - x, a, a)
    angle = math.degrees(math.atan( h * 1.0 / a))
    print(angle)
else:
    h = get_vol(x, b, b)
    angle = math.degrees(math.atan(h * 1.0/ a))
    print(90 - angle)

Submission status: Accepted

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

import numpy as np

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

Submission status: Accepted

Solution code:
import math

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

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

theta = math.degrees(theta_rad)
print(theta)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
[a,b,x]=list(map(int,input().split()))
if a*a*b/2<=x:
	A=b/a
	B=x/(a*a*a)
	tan=((A**2-B**2)/(A+B))*2
	thita=math.atan(tan)
	dosu=math.degrees(thita)
else:	
	tan=2*x/(a*b*b)
	thita=math.atan(tan)
	dosu=90-math.degrees(thita)
print(dosu)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
  
inp = input().split(" ")
inp = [float(i) for i in inp]

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

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

Submission status: Accepted

Solution code:
import math 

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
def water(a,b,x):
  import math
  if math.tan(math.radians(x))<=b/a:
    return (((a**2)*math.tan(math.radians(x))))/2+a*(b-a*math.tan(math.radians(x)))
  else:
    return b**2/(2*math.tan(math.radians(x)))

p=0
q=90
r=0
while r<=1000:
  if water(a,b,(p+q)/2)<=x/a:
    p=p
    q=(p+q)/2
    r=r+1
  else:
    p=(p+q)/2
    q=q
    r=r+1

print((p+q)/2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if x <= a*a*b/2: #三角形
  print(90-math.degrees(math.atan(2*x/(a*b*b))))
  
else:
  print(math.degrees(math.atan((-2*x/(a*a)+2*b)/a)))

Submission status: Accepted

Solution code:
import sys
import math

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

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


print(ans)

Submission status: Accepted

Solution code:
import math
A,B,X = map(int, input().split())
margin = A * A * B - X
#print(margin)
tansita = 2 * margin / (A ** 3)
#print(tansita)
if A * tansita <= B:
  Ans = math.degrees(math.atan(tansita))
  
else:
  tansita = 2 * X / (A * B * B)
  Ans = math.degrees(math.atan(tansita))
  Ans = 90 - Ans
#print(tansita)
print(Ans)

Submission status: Accepted

Solution code:
import math;

input_line = input().rstrip().split(' ')
a = int(input_line[0])
b = int(input_line[1])
x = int(input_line[2])

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

Submission status: Accepted

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

if x >= a * a * b / 2:
    h0 = x / a / a
    tanr = (b - h0) * 2 / a
else:
    h1 = 2 * x / a / b
    tanr = b / h1

print(math.degrees(math.atan(tanr)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from math import *
input = lambda: sys.stdin.readline()[:-1]
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

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

d = degrees(atan(2*((b-(x/(a**2)))/a)))
if d>=degrees(atan(b/a)):
    d=degrees(atan(1/(2*x/a/b/b)))
print(d)
# print(degrees(atan(2*((b-(x/(a**2)))/a))))
# print(degrees(atan(2*((a-(x/(b**2)))/b))))

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
space = a*a*b
aki = space - x
if x >= space / 2:
    sankaku = aki / a
    y = sankaku * 2 / a
    z = (a*a + y*y)**0.5
    ans = math.degrees(math.atan(y/a))
else:
    sankaku2 = x / a
    a2 = sankaku2 * 2 / b
    d = (a2*a2 + b*b)**0.5
    ans1 = math.degrees(math.atan(a2/b))
    ans = 90 - ans1
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import numpy as np

pi = np.pi
n=input()
t=n.split()
a= int(t[0])
b=int(t[1])
x=int(t[2])

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

Submission status: Accepted

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

max_=a**2*b
if x<=max_/2:
  num=x*2/a/b
  num2=math.sqrt(b**2+num**2)
  print(90-math.degrees(math.asin(num/num2)))
else:
  num=x*2/a/a-b
  num2=math.sqrt((b-num)**2+a**2)
  print(90-math.degrees(math.asin(a/num2)))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

    
def main():
    Input = [input() for i in range(1)]
    #N = int(Input[0])
    a,b,x = list(map(int,Input[0].split()))
    if x == a*a*b:
        print(0)
    else:
        a = float(a)
        b = float(b)
        x = float(x)
        ans = 90-math.atan(a/(2*(b-x/(a*a))))*180/math.pi
        if b * math.tan((90-ans)*math.pi/180) < a:
            ans = 90-math.atan(2*x/a/b/b)*180/math.pi
        print(ans)
        
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

v = a*a*b

h = x / (a*a)

if 2*x <= v:
	#x = a*b*num/2
	num = (2*x) / (a*b)
	#tan(ans) = b / num
	ans = math.degrees(math.atan(b/num))
	print('{:.12g}'.format(ans))
else:
	#v-x = a*num*a/2
	num = 2*(v-x) / (a*a)
	#tan(ans) = num / a
	ans = math.degrees(math.atan(num/a))
	print('{:.12g}'.format(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*(b-x/a/a)/a)))

Submission status: Accepted

Solution code:
from math import acos, sqrt, degrees
a,b,vol = map(int, input().split())

DEBUG = False
cap = a**2*b
area_tilt = vol/a

if DEBUG:
    print('vol = %d'%vol)
    print('cap = %f'%cap)
    
if vol <= cap/2:
    base = 2*area_tilt/b
    hypo = sqrt(base*base+b*b)
    deg = degrees(acos(b/hypo))
    deg_tilt = 90.0-deg
else: 
    short = b-(2*area_tilt/a - b)
    hypo = sqrt(short*short+a*a)
    deg = degrees(acos(short/hypo))
    deg_tilt = 90.0-deg

if DEBUG:
    print('short = %f'%short)
    print('hypo  = %f'%hypo)
    
print(deg_tilt)

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
# D
import sys
import math


# def main():
#     a, b, x = map(int, sys.stdin.readline().strip().split())
#
#     s = x / a
#     if s > a * b / 2:
#         ans = math.atan(a ** 2 / (2 * (a * b - s)))
#     else:
#         ans = math.atan(2 * s / (b ** 2))
#
#     print(90 - math.degrees(ans))

def main():
    a, b, x = map(int, sys.stdin.readline().strip().split())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

print(theta)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
h = (2 * x) / (a ** 2)
A = a
B = 2*b - h

if B < b:
    print(math.degrees(math.atan2(B, A)))
else:
    print(math.degrees(math.atan2(b, (2 * x)/(a * b))))

Submission status: Accepted

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

import math

temp1 = (a**2 * b - x) * 2.0 / a**3

theta1 = math.degrees(math.atan(temp1))

temp2 = (a * b**2) * 1.0 / (2.0 * x)

theta2 = math.degrees(math.atan(temp2))

if a**2 * b < 2 * x:
    res = theta1
else:
    res = theta2

print(res)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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


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

Submission status: Accepted

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

btm = a*a
air = b * btm - x
if air > x:
  l = 0
  r = 90
  while l < r - 0.00000000001:
    mid = (l + r) / 2
    if x * 2 < a * b * b * math.tan(math.radians(90-mid)):
      l = mid
    else:
      r = mid

  print(l)

else:
  l = 0
  r = 90
  while l < r - 0.00000000001:
    mid = (l + r) / 2
    if air * 2 <= btm * a * math.tan(math.radians(90-mid)):
      l = mid
    else:
      r = mid

  print(90 - r)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
i = list(map(int, input().split()))
a, b, x = i[0], i[1], i[2]

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

print(ans)

Submission status: Accepted

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

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

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

print(Answer)

Submission status: Accepted

Solution code:
import math

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

y = x/a**2

tan = float(0)
theta = float(0)
if y >= b/2:
    theta = math.degrees(math.atan(2*(a**2*b-x)/a**3))
else:
    theta = 90 - math.degrees(math.atan(2*x/(a*b**2)))

print(theta)

Submission status: Accepted

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

bottle=(a**2)*b

if x <= bottle/2:
  # 半分以上傾ける場合
  soko=(x*2/b)/a
  
  #bに対してtangent(r)がsokoとなるrを求める
  r=90-(math.degrees(math.atan(soko/b)))
  
else:
  # 半分傾けられない場合
  takasa=((a**2)*b-x)*2/(a**2)
  
  #takasaに対してtangent(r)がaとなるrを求める
  if takasa==0:
    r=0
  else:
      r=90-(math.degrees(math.atan(a/takasa)))

print(r)

Submission status: Accepted

Solution code:
import numpy as np
import math

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

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:

import sys
import math
A, B, X = [float(v) for v in input().split()]

tansheeta = (2 * X) / (A * B * B)
if tansheeta > A / B:
    tansheeta = (2 * (A * A * B - X)) / (A * A * A)
    sheeta = math.atan(tansheeta)
    print(sheeta / math.pi * 180)
else:
    sheeta = math.atan(tansheeta)
    print(90 - sheeta / math.pi * 180)

Submission status: Accepted

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

if x>=a**2*b/2:
    c = 2*b - 2*x/a**2
    print('{:.11g}'.format(math.degrees(math.atan(c/a))))
else:
    c=2*x/(a*b)
    print('{:.11g}'.format(90.0-math.degrees(math.atan(c/b))))

Submission status: Accepted

Solution code:
import math
import sys
ans=float(0)
a, b, x =map(float, input().split())

if x==a*a*b:
    ans=0

    ans=math.degrees(ans)

    print('{:.7f}'.format(ans))
    sys.exit()
c=(2*x/a/a)-b
if c > 0:
    ans=math.atan(a/(b-c))

else:
    ans=math.atan(2*x/a/b/b)
ans=math.degrees(ans)
ans=90-ans
print('{:.7f}'.format(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
def suku(a, b, x):
    return math.atan((a*b*b)/(2*x)) * (180/math.pi)
def ooi(a, b, x):
    return math.atan((2*(a*a*b - x))/(a*a*a)) * (180/math.pi)

if a*a*b >= 2*x:
    print(suku(a, b, x))
else:
    print(ooi(a, b, x))

Submission status: Accepted

Solution code:
import math

a,b,x = map(int, input().split(' '))
menseki = a**2
taiseki = menseki * b
half = taiseki * (1/2)
sakai = half - x
nokori = taiseki - x
if sakai == 0:
    rad = math.atan(b/a)
    deg = math.degrees(rad)
elif sakai < 0:
    n =2 *  nokori / a**2
    rad = math.atan(n/a)
    deg = math.degrees(rad)
elif sakai > 0:
    ah = 2 * x / (a*b)
    rad = math.atan(b/ah)
    deg = math.degrees(rad)
print(deg)

Submission status: Accepted

Solution code:
import sys
import math


def main():
    a, b, x = [int(s) for s in sys.stdin.readline().strip().split()]
    # a, b, x = 2, 2, 4
    # a, b, x = 12, 21, 10
    # a, b, x = 3, 1, 8

    half = a * b / 2
    xs = x / a

    def b_search(target, amax, hen):
        amin = 0.0
        t = amax
        s = hen * t / 2
        while abs(s - target) > 0.0000000001:
            if s > target:
                amax = t
                t = (t + amin) / 2
            else:
                amin = t
                t = (t + amax) / 2
            s = hen * t / 2
        return t

    if half < xs:
        should_removed = a * b - xs
        t = b_search(should_removed, b, a)
        cos2r = a * a / (t * t + a * a)
    else:
        t = b_search(xs, a, b)
        cos2r = t * t / (t * t + b * b)
    cosr = math.sqrt(cos2r)
    ans = math.degrees(math.acos(cosr))
    print(ans)


main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

D = input().split()
a = int(D[0])
b = int(D[1])
x = int(D[2])

tan = (((a ** 2) * b - x) / (a ** 3)) * 2

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

Submission status: Accepted

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

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

print(theta)

Submission status: Accepted

Solution code:
# coding: utf-8
import math


def solve(*args: str) -> str:
    a, b, x = map(int, args[0].split())
    ret = 0.0
    if x < a*a*b/2:
        d = (2*x)/(a*b)
        ret = math.degrees(math.atan2(b, d))
    else:
        d = ((2*x)/(a*a)) - b
        ret = math.degrees(math.atan2(b-d, a))

    return str(ret)


if __name__ == "__main__":
    print(solve(*[input() for _ in range(1)]))

Submission status: Accepted

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

Submission status: Accepted

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