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 = map(int, input().split())

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

print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
import math
a, b, x = [int(x) for x in stdin.readline().rstrip().split()]

box = a*a*b
air = box-x
if air * 2 > box:
    # 水が少ない 複雑
    h = 2*x/b/a
    l = (h**2 + b**2)**0.5
    degree = math.degrees(math.acos(h/l))
else:
    # air が三角
    hight = air/a/a*2
    l = (a**2 + hight**2)**0.5
    degree = math.degrees(math.acos(a/l))

print(degree)

Submission status: Accepted

Solution code:
import math

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

area_base = a ** 2
volum_bottle = area_base * b

k = (2 * (volum_bottle - x)) / a ** 2

if k <= b:
  K_t = k / a
  angle = math.degrees(math.atan(K_t))
else:
  L_t = a * (b ** 2) / (2 * x)
  angle = math.degrees(math.atan(L_t))
  
print(round(angle, 10))

Submission status: Accepted

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

T = a * b / 2 * a

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

Submission status: Accepted

Solution code:
import numpy as np
def solve(a, b, x):
    if a < b:
        if x < a*a*b/2:
            h = 2*x / (a*b)
            theta = np.arctan(b/h)
        else:
            h = 2*(a*a*b - x) / (a*a)
            theta = np.arctan(h/a)
    else:
        if x < a*a*b/2:
            h = 2*x / (a*b)
            theta = np.arctan(b/h)
        else:
            h = 2*(a*a*b - x) / (a*a)
            theta = np.arctan(h/a)
    return theta / np.pi * 180

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
h=x/(a**2)
if h<b/2:
    y=2*a*h/b
    shita=math.degrees(math.atan2(b,y))
if h>=b/2:
    y=2*h-b
    t=b-y
    shita=math.degrees(math.atan2(t,a))
print(shita)

Submission status: Accepted

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

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

Submission status: Accepted

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

print(theta)

Submission status: Accepted

Solution code:
import math
a,b,x=list(map(int,input().split()))
maxv=a*a*b
sukima=maxv-x
teimenseki=sukima/a
y=teimenseki*2/a
 
if x > (maxv/2):
    print(math.degrees(math.atan(y/a)))
else:
    tei=x/a
    z=tei*2/b
    print(math.degrees(math.atan(b/z)))

Submission status: Accepted

Solution code:
import math

if __name__ == "__main__":
    li = list(map(int,input().split()))
    a=li[0]
    b=li[1]
    x=li[2]

    s=x/a

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

Submission status: Accepted

Solution code:
import math
input01 = input()
a=input01.split()

tate=float(a[0])
takasa=float(a[1])
mizu=float(a[2])
menseki1 = tate * takasa
menseki2 = mizu / tate
diff=menseki1-menseki2
rad=0
if(diff <= tate*takasa/2):
    stakasa=2*diff/(tate)
    rad = math.degrees(math.atan(stakasa/tate))
elif(diff > tate*takasa/2):
    stakasa=2*(menseki1-diff)/(takasa)
    rad = math.degrees(math.atan2(takasa,stakasa)) 
    

print(rad)

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

Submission status: Accepted

Solution code:
import numpy as np
a, b, x = map(float, input().split())
V = a**2 * b
if V/2 >= x:
    rad = np.arctan(a*b**2/2/x)
else:
    rad = np.arctan(2*(V-x)/a**3)
print(np.rad2deg(rad))

Submission status: Accepted

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

#水がba**2/2よりも少ないとき
if x <= (a**2)*b//2:
  y = 2*x/(a*b)
  print(math.degrees(math.atan(b/y)))
else:
  y = 2*(b-x/(a**2))
  print(math.degrees(math.atan(y/a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

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

if a*a*b/2 <= x:
	T=a*(b-(x/(a*a)))
	c=2*T/a 
	d = math.atan2(c, a)
	d_deg=math.degrees(d)
else:
	e=2*x/(a*b)
	d = math.atan2(b, e)
	d_deg=math.degrees(d)
	
#print(d)
print(d_deg)

Submission status: Accepted

Solution code:
import math

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

cap = a ** 2 * b

if x == cap / 2:
    s = 45
elif x < cap / 2:
    t = 2 * x / (a * b ** 2)
    s = 90 - math.degrees(math.atan(t))
else:
    q = cap - x
    t = 2 * q / (a ** 3)
    s = math.degrees(math.atan(t))
    
print(float(s))

Submission status: Accepted

Solution code:
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l1 = x*2 / suf2
    x = float(b)/l1
    ans = math.degrees(math.atan(x))
else:
    l2 = (vol-x)*2 / (a*a)
    x = l2/float(a)
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
nums = [int(e) for e in input().split()]
a = nums[0]
b = nums[1]
x = nums[2]
if a * a * b < 2 * x:
    print(math.degrees(math.atan(2*b/a - 2*x/(a**3))))
else:
    print(math.degrees(math.atan(a*b*b/(2 * x))))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
list = input().split()

a = int(list[0])
b = int(list[1])
x = int(list[2])

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

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

a,b,x = map(int, open(0).read().split())
if a*a*b/2 >= x:
  theta = np.rad2deg(np.arctan(a*b*b/2/x))
else:
  theta = np.rad2deg(np.arctan(2*(a*b-x/a)/a/a))
print(theta)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

R = math.sqrt(P * P + Q * Q)
cosp = (Q * Q + R * R - P * P) / (2 * Q * R)
print(90 - math.degrees(math.acos(cosp)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

if x <= a * a * b / 2:
    a_ = 2 * x / a / b
    r = (a_**2 + b**2)**0.5
    theta = np.arcsin(b / r)
else:
    b_ = 2 * (a**2 * b - x) / a**2
    r = (a**2 + b_**2)**0.5
    theta = np.arcsin(b_ / r)

print(np.degrees(theta))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math

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

if 2*x/(a*b) <= a:
    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 = list(map(int,input().split()))
if a*b*0.5*a > x:
    c = (2*x) / (a*b)
    ans = 90 - math.degrees(math.atan(c/b))
    print(ans)
else:
    c = (2*x) / a**2 - b
    if b-c == 0:
        ans = 0
    else:
        ans = 90 - math.degrees(math.atan(a/(b-c)))
    print(ans)

Submission status: Accepted

Solution code:
import math

nums = [int(e) for e in input().split()]

if nums[2] >= ((nums[0]**2 * nums[1]) / 2):
    a = 2*((nums[0]**2 * nums[1]) - nums[2]) / nums[0]**3
    print(math.degrees(math.atan(a)))

else:
    a = (nums[0] * nums[1]**2) / (2 * nums[2])
    print(math.degrees(math.atan(a)))

Submission status: Accepted

Solution code:
import math

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


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

print(math.degrees(ans))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

h = ((x/a)/b)*2
w = b
r = math.sqrt(h*h + w*w)

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

Submission status: Accepted

Solution code:
# # 整数の入力
# a = int(input())
# # スペース区切りの整数の入力
# b, c = map(int, input().split())
# # 文字列の入力
# s = input()
import math
a, b, x = map(int, input().split())
x /= a
# print(x, a, b)
if x <= a * b / 2:
    ans = 90 - math.degrees(math.atan(x * 2 / b / b))

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

print(ans)

Submission status: Accepted

Solution code:
import math
 
a,b,x = map(int, input().split())
 
def over_flag(a,b,x):
    return math.atan( 2*b/a-2*x/a**3 )*180/math.pi
 
def below_flag(a,b,x):
    return 90-math.atan(2*x/(a*b**2))/math.pi*180
 
def main(a,b,x):
    if x>a**2*b:
        print(0)
        return 0
    if x>a**2*b/2:
        print(over_flag(a,b,x))
    else:
        print(below_flag(a,b,x))
    return 0
main(a,b,x)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

def main(a,b,x):
    if x>a**2*b:
        print(0)
        return 0
    if x>a**2*b/2:
        print(over_flag(a,b,x))
    else:
        print(below_flag(a,b,x))
    return 0
main(a,b,x)

Submission status: Accepted

Solution code:
def main():
  a, b, c = map(int, input().rstrip("\n").split(" "))

  import math

  container_size = (a * a * b)
  if c <= container_size / 2:
    height = a * (c / (container_size / 2))
    angle = math.degrees(math.atan(height / b))
  else:
    empty_space = container_size - c
    width = b * (empty_space / (container_size / 2) )
    #print(empty_space,width)
    angle = 90 - math.degrees(math.atan(width / a))

  print(90 - angle)

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
import numpy as np

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

V = a**2 * b
if 0 <= x < V / 2:
    c = x / a / b * 2
    rad = np.arctan(b / c)
elif V / 2 <= x <= V:
    c = (V - x) / a**2 * 2
    rad = np.arctan(c / a)
deg = rad * (180 / np.pi)
print(deg)

Submission status: Accepted

Solution code:
import math
s = input().split()
a = int(s[0])
b = int(s[1])
x = int(s[2])
if x < a**2*b/2:
    deg = math.degrees(math.atan2(a*b**2, 2*x))
else:
    deg = math.degrees(math.atan2(2*a**2*b-2*x, a**3))
print(deg)

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

Submission status: Accepted

Solution code:
import math

a, b, x = map(int,input().split())
#xが0.5*Vを超えるか超えないかで場合分け
if x > 0.5*a*a*b:
    y = 2*x/a/a - b
    tan = (b-y)/a
    ans = math.atan(tan)
    print(math.degrees(ans))

elif x < 0.5*a*a*b:
    y = 2*x/a/b
    tan = b/y
    ans = math.atan(tan)
    print(math.degrees(ans))

else:
    print("45.0000000000")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import time
st_time=time.time()

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
inf=float('inf')
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True


a,b,x=LI()
if x<a*a*b/2:
    t=a*b*b/2/x
    ans=math.atan(t)/math.pi*180
else:
    t=2*b/a-2*x/(a**3)
    ans=math.atan(t)/math.pi*180

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
mi = lambda : map(int, input().split())

import math

a, b, x = mi()

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

print(ans)

Submission status: Accepted

Solution code:
import math
N=list(map(int,input().split()))



if N[2]<=N[0]**2*N[1]/2:   
 a=N[1]
 b=N[2]/N[0]/N[1]*2
 print(90-math.degrees(math.atan(b/a)))
else: 
 c=N[0]**2*N[1]-N[2]
 a=N[1]
 b=c/N[0]/N[0]*2

 print(math.degrees(math.atan(b/N[0])))

Submission status: Accepted

Solution code:
import math

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

a2 = 2 * x / (a * b)

if a2 <= a:
    ans = math.atan(b / a2) * 360 / (2 * math.pi)

else:
    y = (a * a * b) - x
    b2 = 2* y / (a * a)
    ans = math.atan(b2 /a) * 360 / (2 * math.pi)

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

def f(a, b, x):
    v = a**2*b
    if x >= v/2:
        return np.rad2deg(np.arctan((v-x)*2/a**3))
    else:
        return np.rad2deg(np.arctan((a*b**2/(x*2))))

x = map(int, input().split())
print(f(*x))

Submission status: Accepted

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

if x >= a**2*b/2:
    print(degrees(np.arctan((2*b/a-2*x/a**3))))
else:
    print(90-degrees(np.arctan(2*x/(a*b**2))))

Submission status: Accepted

Solution code:
import math

def main():
    X = input().split(' ')
    a = int(X[0])
    b = int(X[1])
    x = int(X[2])

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math


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


def calc_tan_theta(a, b, x):
    mass = a * a * b
    if x >= mass / 2:
        return 2 * (b - x / (a * a)) / a
    else:
        return 0.5 * a * b * b / x


def main():
    a, b, x = get_input()
    tan_theta = calc_tan_theta(a, b, x)
    degree = math.degrees(math.atan(tan_theta))
    print(degree)


main()

Submission status: Accepted

Solution code:
from math import tan, radians, pi

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

def solve(angle):
    c = A*tan(radians(angle))
    if c <= B:
        max_water = A*B - (A*c/2)
    else:
        d = B*tan(radians(90-angle))
        max_water = B*d/2
    return max_water >= X/A

ok = 0
ng = 90
for i in range(30):
    mid = (ok+ng)/2
    # print(mid, angle_to_max_water(mid))
    if solve(mid):
        ok = mid
    else:
        ng = mid
    # print(l, r)

print(ok)

Submission status: Accepted

Solution code:
from math import tan, radians, pi

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

def angle_to_max_water(angle):
    c = A*tan(radians(angle))
    if c <= B:
        return A*B - (A*c/2)
    else:
        d = B*tan(radians(90-angle))
        # print(d)
        return B*d/2

l, r = 0, 90
for i in range(30):
    mid = (l+r)/2
    # print(mid, angle_to_max_water(mid))
    if angle_to_max_water(mid) <= X/A:
        r = mid
    else:
        l = mid
    # print(l, r)

print(r)

Submission status: Accepted

Solution code:
from math import atan, degrees, pi

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

if x/a >= a*b / 2:
    t_theta = 2*(a*b - x/a) / (a*a)
    theta = degrees(atan(t_theta))
else:
    t_theta = 2 * x / (a * b**2)
    theta = degrees(atan(1 / t_theta))

print(theta)

Submission status: Accepted

Solution code:
from math import atan, degrees

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    from math import degrees, atan

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

    # 水を入れたときの高さhを求める
    # 傾けたときにできる三角形の形状に注目
    if x == (a ** 2) * b:
        # 水筒が満タン
        print(0)
    elif 2 * h >= b:
        # 水筒が半分以上
        print(90 - degrees(atan(a / z)))
    else:
        print(degrees(atan(b / y)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    from math import degrees, atan

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

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


if __name__ == '__main__':
    main()

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

Submission status: Accepted

Solution code:
import math
datas =input()
list = datas.split(" ")
list = [int(i) for i in list]
a = list[0]
b = list[1]
x = list[2]
x_ = x/a
if x > a**2*b/2:
    x__ = a*b - x_
    h = 2*x__/a
    d = math.atan(h/a)
    print(math.degrees(d))
else:
    h = 2*x_/b
    d = math.atan(h/b)
    print(math.degrees(math.pi/2-d))

Submission status: Accepted

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

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

#output
import math
#傾けた時一番低い部分の高さは

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2
from math import pi

a, b, x = map(float, input().split())
s = x / a               # 水の量（平面で考慮）

# 水の量が水筒の半分以上
if  s >= a * b / 2:
    air = a * b - s     # 空気の面積
    h = 2 * air / a     # 傾けた時の空気の量の高さ（a * h = air　を変形）
    rad = atan2(h, a)   # 傾けた時のradian

# 水の量が水筒の半分未満
else:
    w = 2 * s / b       # 傾けた時の水の幅
    rad = atan2(b, w)   # 傾けた時のradian

# ラジアン（rad） から 度（deg）に変換
deg = rad * 180 / pi

print(deg)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *
from math import *
from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    a,b,x = map(int, input().split())
    if x <= a*a*b//2:
        # 断面の形は三角形
        c = x*2/(a*b)
        print(degrees(atan(b/c)))
    else:
        # 断面の形は台形
        # 上辺の長さをcとした時の体積は(c+b)*a//2*a
        # これがxと等しいのでcは以下の通り
        c = x*2/(a*a)-b
        print(degrees(atan((b-c)/a)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
import math
input  = sys.stdin.readline
 
a,b,x = map(int,input().split())
y = (2*x)/(a*b)
if y > a:
  b = b - x/(a**2)
  y = a/2
  print(math.degrees(math.acos(y/math.sqrt(y**2+b**2))))
else:
  print(math.degrees(math.acos(y/math.sqrt(y**2+b**2))))

Submission status: Accepted

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

ht = x/(a*a)
from math import atan, pi
if ht <= b/2:
    print(90 - (atan((2*a*ht)/(b*b))*180)/pi)
else:
    print((atan((2*(b-ht))/a))*180/pi)

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(int, input().split())
ans = 0
if a*a*b > 2*x:
    ans =180.0/np.pi*np.arctan((a*b*b)/(2*x))
else:
    ans = 180.0/np.pi*np.arctan((2*(a*a*b-x))/a**3)

print(ans)

Submission status: Accepted

Solution code:
import numpy as np

a, b, x = map(float, input().split())
ans = 0
if a*a*b > 2*x:
    ans =180.0/np.pi*np.arctan((a*b*b)/(2*x))
else:
    ans = 180.0/np.pi*np.arctan((2*(a*a*b-x))/a**3)

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict, deque
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    return


# B
def B():
    return


# C
def C():
    n = I()
    for i in range(int(n ** 0.5), 0, -1):
        if n % i == 0:
            print(i + n // i - 2)
            return
    return


# D
def D():
    a, b, x = LI()
    if (x <= a * a * b / 2):
        print(math.degrees(math.atan(a * b * b / x / 2)))
    else:
        print(math.degrees(math.atan(2 * (a * a * b - x) / a ** 3)))
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    D()
    return


# Solve
if __name__ == "__main__":
    D()

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

Submission status: Accepted

Solution code:
import math

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

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

else:
	c = 2 * x / (a * b)
	degree = 90 - math.degrees(math.atan2(c,b))

print(degree)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi

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

h = x / a**2
if h > b / 2:
    tan_theta = 2*(b - h) / a
else:
    tan_theta = b**2 / (2*a*h)

theta = atan(tan_theta) * 180 / pi

print(theta)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import math

# スペース区切りの整数の入力
a, b, x = map(int, input().split())

#三角形
if x/a <= (a*b)/2 : 
  Theta = math.atan2( b, (2*x)/(a*b) )
  
#台形
else :
  Theta = math.atan2( (2*b) - ((2*x)/(a*a)) , a )
  
print (math.degrees(Theta))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Nov  6 22:17:58 2019

@author: over-
"""

import numpy as np

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

S=x/a
if S > a*b/2:
    c=2*S/a-b
    tan=(b-c)/a
    deg=np.rad2deg(np.arctan(tan))
else:
    c=2*S/b
    tan=b/c
    deg=np.rad2deg(np.arctan(tan))
    
print(deg)