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:
# -*- coding: utf-8 -*-
import numpy as np
from collections import deque
import collections

mod = 10 ** 9 + 7
a, b, x = list(map(int, input().split()))
if (a * a * b / 2 >= x):
    print(90. - np.rad2deg(np.arctan(2*x/(a*b*b))))
else:
    print(np.rad2deg(np.arctan(2*b/a - 2*x/(a**3))))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
x /= a
half = a * b // 2
# 引数の角度で入る水の量を計算する
def check(theta):
    if x <= half:
        theta = math.radians(theta)
        return b ** 2 / 2 * math.tan(theta)
    else:
        theta = math.radians(90-theta)
        return a * b - (0.5 * a ** 2 * math.tan(theta))

l, r = 0, 90
for _ in range(10000):
    mid = (l+r) / 2
    if check(mid) > x:
        r = mid
    else:
        l = mid
    
print(90-l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if x == half:
    print(45)
elif x > half:
    print(math.degrees(math.atan(2*(a**2*b - x) / pow(a,3))))
else:    
    print(math.degrees(math.atan((a*b**2) / 2 / x)))

Submission status: Accepted

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0-10**(-9), 90-math.degrees(math.atan(b/a))+10**(-9)
  while r-l > pow(10, -7):
    k = (r+l)/2
    if x <= a*b*b*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0-10**(-9), math.degrees(math.atan(b/a))+10**(-9)
  while r-l > pow(10, -7):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

"""
平面で考える　
こぼれるときに水が台形になってるなら三角形にする
（直角）三角形の長さを求めてhttps://keisan.casio.jp/exec/system/1259903491　にある計算をする
"""
s=x/a#平面化

if a*b==s:
    print(0)
    exit()

if a*b/2 < s:  #台形
    a1=a
    b1=b-(s/a*2-b)


else: #三角形
    a1= s*2/b 
    b1=b
#print(a1,b1)
ans=math.atan(b1/a1)#サイトの計算
#print(ans)
print(ans*(180.0/math.pi))#ラジアンを角度変換する

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')

from math import atan2, degrees

def solve():
    a, b, x = MI()

    s = x / a

    if a * b == 2 * s:
        theta = 45
    elif a * b < 2 * s: # 半分より多い
        h = 2 * (a * b - s) / a
        theta = degrees(atan2(h, a))
    else:               # 半分より少ない
        w = 2 * s / b
        theta = degrees(atan2(b, w))
    print(theta)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

INF = float('inf')
from math import atan, degrees

def solve():
    a, b, x = MI()

    v = pow(a, 2) * b
    h = x / pow(a, 2)
    #print(x, v)

    if 2 * x == v:
        theta = 45
    elif 2 * x > v: # 半分より多く入っている
        #print('a')
        tei = a
        # taka =
        taka = 2 * (v - x) / pow(a, 2)
        theta = degrees(atan(taka / tei))
    else:           # 半分より少ない
        tei = b
        # taka = 2 * x / b
        taka = 2 * x / (a * b)
        theta = 90 - degrees(atan(taka / tei))
    print(theta)

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from math import atan, atan2, degrees

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

th = atan2(a, b)

if a**2*b == x:
    print(0)
else:
    tmp1 = atan(a**3 / (2 * (a**2 * b - x)))
    tmp2 = atan(2 * x / (a * b**2))

    if tmp1 <= th:
        print(90 - degrees(tmp2))
    else:
        print(90 - degrees(tmp1))

Submission status: Accepted

Solution code:
import math
a,b,x=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(math.degrees(rad))

Submission status: Accepted

Solution code:
from math import atan, degrees

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

Submission status: Accepted

Solution code:
import math

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

halfvol = a**2*b/2

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

print(math.degrees(theta))

Submission status: Accepted

Solution code:
import math


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
a, b, x = map(int, input().split())
up, down = 0, b
a_dec = 2*x / (a * b)
if a_dec > a:
    up = 2 * x/(a**2) - b
    up = b - up
    c = (a**2+up**2)**(1/2)
    print(math.degrees(math.asin(up/c)))
    sys.exit(0)
c = (a_dec**2+b**2)**(1/2)
print(math.degrees(math.asin(b/c)))

Submission status: Accepted

Solution code:
import math
(a,b,x)=input().split()
(a,b,x)=(int(a),int(b),int(x))
c=(2*b)-((2*x)/(a**2))
if c<=b:
  d=((a**2)+(c**2))**(1/2)
  cos=c/d
  deg=math.acos(cos)
else:
  c=(2*x)/(a*b)
  d=((b**2)+(c**2))**(1/2)
  cos=b/d
  deg=math.acos(cos)
print(90-math.degrees(deg))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8

import sys
import math
import collections
import itertools
INF = 10 ** 13
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def lcm(x, y) : return (x * y) // math.gcd(x, y)
def I() : return int(input())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def LS() : return input().split()
def RS(N) : return [input() for _ in range(N)]
def LRS(N) : return [input().split() for _ in range(N)]
def PL(L) : print(*L, sep="\n")
def YesNo(B) : print("Yes" if B else "No")
def YESNO(B) : print("YES" if B else "NO")

A, B, X = LI()

S = X / (A**2) * A

if S == A * B:
    print(0)
else:
    if S > A * B / 2:
        BU = 2 * S / A - B
        B = B - BU
        S = S - (A * BU)

    print(math.degrees(math.atan(B**2 / (2*S))))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math

def solve(a: int, b: int, x: int):
    full = a*a*b
    
    if x >= full//2:
        theta = math.atan(2*b/a-2*x/a/a/a)
    else:
        theta = math.atan(a*b*b/x/2)
    
    print(theta*180/math.pi)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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:
import math

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

V = a * a * b

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

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

print (90 - math.degrees(math.atan(tmp)))

Submission status: Accepted

Solution code:
import numpy as np
from scipy import optimize
a,b,x = (int(x) for x in input().split())
v = a**2*b
def f(s):
    return v - (a**3*np.tan(s)/2) - x
def g(s):
    return (a*(b**2)*np.tan(s)/2) - x
if 2*x >= v:
    c = optimize.fsolve(f,0)
    print(np.rad2deg(c)[0])
else:
    c = optimize.fsolve(g,0)
    print(90-np.rad2deg(c)[0])

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
import math
def main():
    a,b,x=map(int,input().split())
    if x==a**2*b:
        print(0)
        sys.exit()
    if x<=a**2*b/2:
        print(90.0-math.degrees(math.atan((2*x)/(a*b**2))))
    else:
        z=2*x/a**2-b
        print(90.0-math.degrees(math.atan(a/(b-z))))

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

s = x/a

u = 2*s/a-b

if u >= 0:
	d = math.degrees(math.atan((b-u)/a))
else:
	u = s*2/b
	d = math.degrees(math.atan(b/u))

print(d)

Submission status: Accepted

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

Submission status: Accepted

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

nokori = a*a*b-x

if nokori <= x:
    c = nokori /a /a *2
    ans = math.degrees(math.atan2(c,a))
else:
    c = x/a/b*2
    ans =math.degrees(math.atan2(b,c))
print(ans)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
men = x / a
if a * b / 2 <= men:
    h = (((a * b) - men) * 2) / a
    theta = math.degrees(math.atan(h/a))
    print(theta)
    exit()
a_dash = men * 2 / b
theta = math.degrees(math.atan(a_dash / b))
print(90 - theta)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def check(a, b, x, deg):
    theta = math.radians(deg)
    if b * math.cos(theta) >= a * math.sin(theta):
        return (a * a) * (b - a * math.tan(theta) / 2.0) >= x
    else:
        return (b * b * a) / (2.0 * math.tan(theta)) >= x


a, b, x = map(float, input().split(" "))
high, low = 90, 0   # [low, high)
while (high - low) > 1e-10:
    mid = (high + low) / 2
    if check(a, b, x, mid):
        low = mid
    else:
        high = mid
print(low)

Submission status: Accepted

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

thre = a*a*b / Decimal(2.0)
if x >= thre:
    d = 2*b - 2*x / (a*a)
    theta = 180.0 / pi * atan(d / a)
    print(theta)
else:
    d = 2* x / (a*b)
    theta = 180.0 / pi * atan(b / d)
    print(theta)

Submission status: Accepted

Solution code:
import math

# A = 2
# B = 2
# V = 4
#
# A = 12
# B = 21
# V = 10
#
# A = 3
# B = 1
# V = 8

A,B,V = map(int,input().split())

def process(a,b,v):
    if v > a**2*b/2:
        y = 2*b - 2*v/(a**2)
        return  y/a
    elif v == a**2*b:
        return b/a
    else:
        x = 2*v / (a*b)
        return b / x




result = process(A,B,V)

print( math.degrees(math.atan(result)))

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

temp = 2 * b - 2 * x / a ** 2
if temp < b:
    s = a
    t = temp
else:
    s = 2 * x / a / b
    t = b

theta = degrees(atan2(t, s))
print(theta)

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# solution
import io
import math

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

Submission status: Accepted

Solution code:
#n=int(input())
a,b,x=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

import math

s=x/a
if x==a*a*b:
    print(0)
elif s<= a*b/2:
    c=2*s/b
    deg=math.degrees(math.atan(c/b))
    ans=90.0-deg
    print('{:.9f}'.format(ans))
else:
    s=a*b-s
    h=2*s/a
    deg=math.degrees(math.atan(a/h))
    ans=90.0-deg
    print('{:.9f}'.format(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
h=x/a**2
#print(h)


import math
#print(math.degrees(math.atan2(0,1)))

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

Submission status: Accepted

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

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

print(90-tanθ)

Submission status: Accepted

Solution code:
import math 

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)
# MOD = 10 ** 9 + 7
# INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


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

if a * a * b < 2 * x:
    p1 = 2 * (a * a * b - x)
    p2 = a * a * a
else:
    p1 = a * b * b
    p2 = 2 * x

res = math.degrees(math.atan(p1 / p2))
print(res)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
import time

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

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

Submission status: Accepted

Solution code:
import math
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys

sys.setrecursionlimit(10 ** 5 + 10)


def input(): return sys.stdin.readline().strip()


def resolve():
    def main():
        a, b, x = map(int, input().split())
        x = x / a
        # failed/clearの境界がある場合のスコアの（最大）最小値を求める場合、
        # failedかclearで二分探索をする。

        # https://atcoder.jp/contests/abc146/tasks/abc146_c

        # 探索範囲を適当に定める
        l = 0
        r = math.pi/2

        # 以降、r以降はfailedという設定。それゆえ、初期rでclearの場合は例外。
        while l + 10 ** (-10) < r:
            estimate = (l + r) / 2
            if b*math.tan(math.pi / 2 - estimate) <= a:
                #print(b * b * math.tan(math.pi / 2 - estimate)*0.5)
                if b * b * math.tan(math.pi / 2 - estimate)*0.5 >= x:
                    l = estimate
                else:
                    r = estimate
            else:
                if a * b - (a * a * math.tan(estimate)*0.5) >= x:
                    #print(a * b - (a * a * math.tan(estimate)*0.5))
                    l = estimate
                else:
                    r = estimate

        return math.degrees(l)  # それゆえlを返す

    print(main())


resolve()

Submission status: Accepted

Solution code:
import math

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

# 弧度法を度数法に変換
def toDosu(x):
    return (x/math.pi) * 180

f = a**2*b/2

if x > f:
    t = toDosu(math.atan( (-2*x + 2*a**2*b)/(a**3) ))
elif x == f:
    t = 45.0
else:
    t = toDosu(math.atan( (a*b**2)/(2*x) ))

print(t)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if x <= (b * a**2) / 2: 
    ans_rad = np.arctan((a * b**2) / (2 * x))
elif x > (b * a**2) / 2:
    ans_rad = np.arctan((2 * b * a ** 2 - 2 * x) / a**3)

ans = ans_rad * (180 / pi)
print("{}".format(np.round(ans, 7)))

Submission status: Accepted

Solution code:
import math

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

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

print(theta)

Submission status: Accepted

Solution code:
from math import degrees, atan

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

vol = a * a * b

def A(a, b, x):
    return degrees(atan((a * b * b) / (2 * x)))

if vol == x:
    result = 0
elif 2 * x > vol:
    x -= vol / 2
    tmp = A(a, a, vol / 2 - x)
    result = 90 - tmp
else:
    result = A(a, b, x)

print(result)

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline
 
a, b, x = map(int, input().split())
 
m = a ** 2 * b
if x <= m / 2:
    c = (x * 2) / (a * b)
    ans = math.degrees(math.atan(b / c))
else:
    c = 2 * (m - x) / (a ** 2)
    ans = math.degrees(math.atan(c / a))
 
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(b/(2*x/b/a))))
else:
  print(math.degrees(math.atan((b-x/a/a)/(a/2))))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x = map(int, input().split())
    theta = None
    if 2*x <= a*a*b:
        theta = math.atan((a*b*b)/(2*x))
    else:
        theta = math.atan(2*(a*a*b-x)/(a**3))
    print(math.degrees(theta))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(ans)

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

Submission status: Accepted

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

import math

half = a*b*a/2

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

print(theta)

Submission status: Accepted

Solution code:
import math

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

PI = math.acos(-1)
ans = 0

def radianToDegree(p):
    return math.degrees(p)

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

print(radianToDegree(ans))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 初期入力
a,b,X = map(int, input().split())

#
suito_taiseki = a*a*b #水筒の体積
h_wate = X/a/a #水面の高さ

from math import atan,degrees
if suito_taiseki/2 <=X:
    y = (b-h_wate)*2
    kakudo =degrees( atan(y/a) )
else:
    y =2*X/b/a
    kakudo =90-degrees(atan(y/b))


print(kakudo)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2, degrees
A, B, X = map(int, input().split())
S = X / A


if S >= A * B / 2:
    h = (2 * (A * B - S)) / A
    print(degrees(atan2(h, A)))

else:
    w = (2 * S) / B
    print(degrees(atan2(B, w)))

Submission status: Accepted

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

import numpy as np
half = a * a * b / 2
if x > half:#すぐ零れる場合
    V = a * a * b
    S = (V - x) / a
    h = 2 * S / a
    rad = np.arctan(h / a)
    deg = rad * 180 / np.pi
    print(deg)
else:#なかなか零れない場合
    h = x * 2 / a / b
    rad = np.arctan(h / b)
    deg = rad * 180 / np.pi
    print(90 - deg)

Submission status: Accepted

Solution code:
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
import numpy as np
from collections import deque, Counter, defaultdict
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import math
from functools import reduce
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
MOD = 10**9+7
def lcm_base(a, b):
    return (a * b) // gcd(a, b)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def main():
  a, b, x = map(int, readline().split())
  V = a*a*b/2
  if V < x:
    ans = math.degrees(math.atan((2*(a*a*b-x))/a**3))
  else:
    ans = math.degrees(math.atan((a*b*b)/(2*x)))
  print(ans)
  
  
  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
from math import degrees, atan

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