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
from decimal import Decimal
a,b,x = list(map(int, input().split()))
ans = 0

#in: 傾き 底面 高さ
#out: 面積
def fb(tilt, a, b):
    #x=0 or y=0
    #y=tilt*x + g
    g=b-a*tilt
    y = g
    x = -g/tilt
    if x>0:
        #(a-a,0) (a-a,b) (x-a,0)
        return abs(0*0 - (x-a)*b)/2
    elif y>0:
        #(a,0) (a,b) (0,y) (0,0)
        return (b+y)*a/2
    else:
        #(a,0) (a,b) (0,0)
        return abs(a*b - a*0)/2
#in: 角度 out: y=axのa
def f(angle):
    a =  math.tan(math.radians(angle))
    return a




high = 90
low = 0
for i in range(1000):
    mid = (high + low) / 2
    m = fb(f(mid), a, b) * a
    if m>x:
        low = mid
    elif m<x:
        high = mid
    else:
        ans = mid
        break

print(mid)

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
#K = int(input())
#S = input()[:-1]
a,b,x = map(int,input().split())

#S,T = map(str,input().split())
#A = list(map(int,input().split()))
#A = [int(input()) for _ in range(N)]
#S = [input() for _ in range(N)]
#A = [list(map(int,input().split())) for _ in range(N)]
import math
v = a*a*b
if x <= v/2:
    d = 2 * x / (a*b*b)
    th = math.degrees(math.atan(d))
    print(90-th)
elif x <= v:
    
    d = 2*(v-x)/(a*a*a)
    th = math.degrees(math.atan(d))
    print(th)

Submission status: Accepted

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

Submission status: Accepted

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

V = a * a * b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
atan = lambda x: math.degrees(math.atan(x))
a, b, x = map(int, input().split())
s = a ** 2 * b
if x >= s / 2:
    theta = atan(2 * (s - x) / (a ** 3))
else:
    theta1 = atan(a * b ** 2 / 2 / x)
    x = min(x, a ** 2 * b / 2 - x)
    delta = (3 * x / b) ** 0.5
    delta = min(delta, 2 ** 0.5 - delta)
    theta2 = atan(b / delta)
    theta = max(theta1, theta2)
print(theta)

Submission status: Accepted

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

if x * 2 >= a ** 2 * b:
    print('{:.8}'.format(degrees(atan(2 * b / a - 2 * x / a ** 3))))
else:
    print('{:.8}'.format(degrees(atan(a * b ** 2 / 2 / x))))

Submission status: Accepted

Solution code:
from math import *
PI = pi

def main():
    A,B,X=map(int,input().split())
    theta=0
    if A*A*B/2<=X:
        theta=atan(2*(A*A*B-X)/(A*A*A))
    else:
        theta=atan(A*B*B/(2*X))
    print(theta*180/PI)

main()

Submission status: Accepted

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

if x < max_volume/2:
    rad = np.arctan(2*x/(a*b**2))
    print(90-np.rad2deg(rad))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from decimal import Decimal
a,b,x = list(map(int,input().split()))
A = a**2
if A*b == x:
  print(0)
elif A*b/2 <= x:
  c = Decimal(x/A)
  d = (b-c)*2
  print(90-(math.degrees(math.atan(Decimal(a/d)))))
else:
  s = Decimal(x/a)
  d = Decimal(s*2/b)
  print(90-(math.degrees(math.atan(Decimal(d/b)))))

Submission status: Accepted

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

v = a * b / 2
if v * a >= x:
  h = x / v
  theta = math.degrees(math.atan2(h, b))
  ans = 90-theta
else:
  k = 2 * x / a / a - b
  theta = math.degrees(math.atan2(a, (b-k)))
  ans = 90 - theta
  
print(ans)

Submission status: Accepted

Solution code:
from math import *

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

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

print(theta)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

a,b,x=MI()
dega=0
degb=90
i=0
while i<100:
    deg=(dega+degb)/2
    sita=math.radians(deg)
    v1=a*a*b-a**3/2*(math.tan(sita))
    v2=a*b*b/2/(math.tan(sita))
    if math.tan(sita)>=(b/a):
        v=v2
    else:
        v=v1
    if v==x:
        ans=deg
        print(ans)
        sys.exit()
    if v>x:
        dega=deg
    if v<x:
        degb=deg
    i=i+1
    #print(deg)
print(deg)

Submission status: Accepted

Solution code:
import math

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

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

    print(theta*180/math.pi)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

v = b*a*a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))
import math
def main():
    a, b, x = input_nums()
    h = x / a**2
    if 2*h-b >= 0:
        print(math.degrees(math.atan((2*b-2*h)/a)))
    else:
        w = (2*a*h)/b
        print(math.degrees(math.atan(b/w)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
"""
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import fractions
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, product, accumulate, groupby
from heapq import heappush, heappop
from collections import deque, defaultdict, Counter
import sys
sys.setrecursionlimit(10 ** 7)
# import numpy as np

inf = 10 ** 20
INF = float("INF")
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]
ddn9 = ddn + [(0, 0)]
'''for dx, dy in dd:
        nx = j + dx; ny = i + dy
            if 0 <= nx < w and 0 <= ny < h:'''
"""
import math


def main():
    a, b, x = map(int, input().split())
    v = a * b / 2
    if v * a >= x:
        h = x / v
        theta = math.degrees(math.atan2(h, b))
        ans = 90 - theta

    else:
        k = 2 * x / a / a - b
        theta = math.degrees(math.atan2(a, (b-k)))
        ans = 90 - theta
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import numpy as np

pi = np.pi

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

S = x/a

if S >= a*b/2:
    h = x/(a**2)
    ans = np.arctan((b - h)/(a/2)) / (2 * pi) * 360
elif S <= a*b/2:
    ans = np.arctan(b/(2*S/b)) / (2 * pi) * 360

print(ans)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

from math import atan, tan, pi

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


def max_v(si):
    si = si / 180 * pi
    if si < atan(b / a):
        area = a * b - a ** 2 * tan(si) / 2
    else:
        area = b * (b / tan(si) / 2)
    return area * a


low = 0
high = 90
while high - low > 1e-7:
    mid = (low + high) / 2
    if max_v(mid) <= x:
        high = mid
    else:
        low = mid
print((high + low) / 2)

Submission status: Accepted

Solution code:
# D - Water Bottle
import math

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

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

print(math.degrees(math.atan(tan_Theta)))

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

y1=(2*a*height)/b   #これってbを固定した時の高さじゃ
if y1>a:#a*height=(b+y)*a/2<=>y=2height-b
    y1=b-(2*height-b)
    print(math.degrees(math.atan(y1/a)))
else:#a*height=b*y/2なるy<=>y=2*a*height/b
    print(math.degrees(math.atan(b/y1)))

Submission status: Accepted

Solution code:
from decimal import *
import math
a,b,x=map(int,input().split())
height=Decimal(x)/Decimal(a*a)

y1=Decimal(2*a*height)/Decimal(b)   #これってbを固定した時の高さじゃ
if y1>a:#a*height=(b+y)*a/2<=>y=2height-b
    y1=b-(2*height-b)
    print(math.degrees(math.atan(y1/a)))
else:#a*height=b*y/2なるy<=>y=2*a*height/b
    print(math.degrees(math.atan(b/y1)))

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

Submission status: Accepted

Solution code:
import math
 
def volume(a,b,t):
    if  b>a*t :#台形パターン
        v =  a*a*b-(0.5*(a**3))*t
    else:#三角形パターン
        v =0.5*b*b*a/t
    return v
  
a, b, x = map(int, input().split())
LR = [0,9*(10**9)]
if x == 0:
    print(0)
else:
    while LR[1]-LR[0]>1:
        mid = 0.5*(LR[0]+LR[1])
        v= volume(a,b,math.tan(math.radians(mid/10**8)))
        if v >x:
            LR[0]=mid
        else:
            LR[1]=mid
    #     print("v==={}\nx==={}\ntan==={}\n{}\n".format(v,x,math.tan(math.radians(mid/10**7)),LR))
    #     time.sleep(1)
    print(LR[0]/10**8)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import degrees, atan2

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

S = x / a
if S >= a * b / 2:
    h = 2 * (a * b - S) / a
    theta = atan2(h, a)
else:
    w = 2 * S / b
    theta = atan2(b, w)
print(degrees(theta))

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*a*a) )))

Submission status: Accepted

Solution code:
import math

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

if 2*x>=(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())
v=a*a*b/2
import math
k=(2*v-x)*2/(a*a)
g=2*x/(a*b)
if x<=v:
  print(math.atan(b/g)*180/math.pi)
else:
  print(math.atan(k/a)*180/math.pi)

Submission status: Accepted

Solution code:
import sys
import math

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B, X = lr()
total = A * A * B
if X >= total / 2:
    Y = total - X # 空の容積
    # A ** 3 * tan(θ) / 2 = Y
    # tan(θ) = 2 * Y / A ** 3 
    answer = math.atan(2*Y / A**3)
else:
    # A * B * B / (tan(θ) * 2) = X
    # tan(θ) = A * B * B / (X * 2)
    answer = math.atan(A*B*B / (X*2))

print(math.degrees(answer))

Submission status: Accepted

Solution code:
import math

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

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

sakaime = a * a * b / 2

if x > sakaime:
    try:
        tan = a / (2 * (b - (x / (a ** 2))))
    except:
        tan = float('inf')
else:
    tan = 2 * x / (a * (b**2))

ans = math.degrees(math.atan(tan))

if ans >= 0:
    print(90-ans)

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

Submission status: Accepted

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

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((a*b**2/2/x))))

Submission status: Accepted

Solution code:
import sys
#import bisect
#from collections import deque
import math

def input():
    return sys.stdin.readline().rstrip('\n')


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

if a*a*b/2 > x:
    adash = x / a / b * 2
    # tan(theta) = adash / b
    theta = math.atan(adash/b)
    # convert radian to degree  (2 * pi radian = 360 degree)
    theta_degree = theta * 180 / math.pi
    print(90-theta_degree)
else:
    adash = ((a*a*b)-x) / a / a * 2
    # tan(theta) = adash / a
    theta = math.atan(adash/a)
    # convert radian to degree  (2 * pi radian = 360 degree)
    theta_degree = theta * 180 / math.pi
    print(theta_degree)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b,x=map(int,input().split())
h=x/(a**2)
if 2*h>=b:
    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:
import math
a, b, x=map(int, input().split())
area=x/a

if area<=a*b/2:
    bottom=2*area/b
    print(math.degrees(math.atan(b/bottom)))
else:
    empty=a*b-area
    right=2*empty/a
    print(math.degrees(math.atan(right/a)))

Submission status: Accepted

Solution code:
import math

a, b, x = [int(i) for i in input().split()]
s = x / a
ans = 0
a2 = 0

if s == a * b:
    # 既に満タン
    ans = 0
else:
    if s > a * b / 2:
        # 台形
        bu = 2 * s / a - b  # 上底 bu
        s -= a * bu
        b -= bu
        # a2 = a とするとコーナーケースを考慮する必要がなくなる
        a2 = 2 * s / b
    else:
        # 三角形の時
        a2 = 2 * s / b
    # アークタンジェント計算（結果はラジアン）
    r = math.atan(b / a2)
    # ラジアン - 角度変換
    ans = r * (180.0 / math.pi)
print(ans)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
if a**2*b/2 >= x:
    print (math.degrees(math.atan(a*b**2/x/2)))
else:
    print (math.degrees(math.atan(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 <= a*b:
    theta = atan(a*b**2/(2*x))*180/pi
else:
    theta = atan(2*(b/a-x/a**3))*180/pi

print(theta)

Submission status: Accepted

Solution code:

import math


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

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

if __name__ == "__main__":
    submit()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

line = list(input().split(" "))
a = int(line[0])
b = int(line[1])
x = int(line[2])

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

# if x >= a*a*b/2
#   x = a*a*b - a*a*(a*sin(theta))/2
#   sin(theta) = 2*(a*a*b - x) / (a**3)
# else
#   x = a*(b*tan(theta))*b/2
#   tan(theta) = 2*x / (a*b*b)

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

# 横から見たときに三角形か台形かで分岐してみる。
maxtriangle = a * b / 2
side_area = x / a
if side_area <= maxtriangle:
    # Triangle
    sub = side_area * 2 / b
    # b/sub == tan θ: arctan(b/sub) == θ
    rad = math.atan(b/sub)
else:
    # Trapezoid
    sub = (b - side_area / a) * 2
    # sub/a == tan θ: arctan(sub/a) == θ
    rad = math.atan(sub/a)

print(math.degrees(rad))

Submission status: Accepted

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

Submission status: Accepted

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

if x <= a ** 2 * b / 2:
    bottom = (x * 2 / (a * b))
    hype = math.sqrt(bottom ** 2 + b ** 2)
    print(math.degrees(math.atan2(b, bottom)))
else:
    x = a ** 2 * b - x
    height = x * 2 / (a ** 2)
    print(math.degrees(math.atan2(height, a)))

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

print(degrees(theta))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

tan = (2 * b - (2 * x) / pow(a, 2)) / a
if 0 < b - a * tan < init:
    ans = np.rad2deg(np.arctan(tan))
    print(ans)
    exit()
    
tan = pow(b, 2) * a / (2 * x)
if 0 < b / tan <= a:
    ans = np.rad2deg(np.arctan(tan))
    print(ans)
    exit()

print(90)

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math

def iip():
    return [int(i) for i in input().split()]

def sita_over(a, x):
    return math.atan(((2*x)/a**3)) / math.pi * 180

def sita_under(a, b, x):
    d = (2*x) / (a*b**2)
    e = math.atan(d) / math.pi * 180
    return 90 - e

def sita(a, b, x):
    if x > 1/2 * a**2 * b:
        vv = a**2 * b - x
        return sita_over(a, vv)
    else:
        return sita_under(a, b, x)


a, b, x = iip()

print(sita(a, b, x))

Submission status: Accepted

Solution code:
from math import atan, degrees

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

ans = 0
if x >= bottle:
    ans = 0
elif x == bottle / 2:
    ans = 45
elif x > bottle / 2:
    h = (bottle - x) * 2 / (a ** 2)
    ans = degrees(atan(h / a))
else:
    h = x * 2 / (b * a)
    ans = degrees(atan(b / h))

print(ans)

Submission status: Accepted

Solution code:
import math

a, b, water = map(int, input().split())
pool = a ** 2 * b

if water == pool:
    ans = 0
elif water > pool / 2:
    high = 2 * (pool - water) / (a ** 2)
    ans = 90 - math.degrees(math.atan(a / high))
elif water == pool / 2:
    ans = 45
else:
    high = 2 * water / (a * b)
    ans = 90 - math.degrees(math.atan(high / b))

print(ans)

Submission status: Accepted

Solution code:
import math

def v(a, b, t):
    if (b * math.tan(math.pi / 2 - t * math.pi / 180) <= a):
        return a * b * b * math.tan(math.pi / 2 - t * math.pi / 180) / 2
    else:
        return a * a * (b - a * math.tan(t * math.pi / 180) / 2)

a, b, x = map(int, input().split())
left = 0
right = 90
eps = 1e-7
for _ in range(1000):
    mid = (left + right) / 2
    if (v(a, b, mid) > x):
        left = mid
    else:
        right = mid
print(mid)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

import math

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


if X == A*A*B:
    print(0.0)
    exit()

# 半分まで
if A*A*B/2 >= X:

    # X / A = B * ha / 2
    ha = 2.0*X / (A*B) 
    rad = math.atan(B/ha)
    ans = rad * 180.0 / math.pi
# 半分より多い
else:
    ue = 2.0 * X / A / A - B
    ha = 2.0 * (X / A - A*ue) / (B - ue)
    rad = math.atan((B-ue)/ha)
    ans = rad * 180.0 / math.pi

print(ans)

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
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)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

def solve():
    a,b,x = LI()
    if b-x/a**2 < x/a**2:
        print(math.atan(2*(b-x/a**2)/a)*180/math.pi)
    else:
        print(math.atan(a*b**2/2/x)*180/math.pi)
    return

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if x > (a ** 2) * b / 2:
	arg = (2 * b / a) - (2 * x / (a ** 3))
else:
	arg = (a * (b ** 2)) / (2 * x)

print(math.atan(arg) / math.pi * 180)

Submission status: Accepted

Solution code:
# import bisect
# import heapq
# from copy import deepcopy
# from collections import deque
# from collections import Counter
# from itertools import accumulate
# from itertools import permutations
# import numpy as np
import math
# mod = 10**9 + 7
#
# n = int(input())
# a = list(map(int, input().split()))
a,b,x = map(float, input().split())

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

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

print(ans*180/math.pi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2,pi
a, b, x = [int(i) for i in input().split()]
x /= a

if x > a * b / 2:
    c = a * b - x
    print(atan2(c * 2 / a, a)*180/pi)
else:
    c = x * 2 / b
    print(atan2(b, c)*180/pi)

Submission status: Accepted

Solution code:
import math
a,b,x = list(map(int,input().split()))
bottle = a**2*b
##水の入っていない量について(水が半分以上入っている)
if x>bottle/2:
    p_bottle = bottle-x
    tanx = p_bottle/(a**3)*2
    ans = math.degrees(math.atan(tanx))
else:
    #a*(b**2*tan(90-x))=x
    tan90x=x/(a*b**2)*2
    ans = 90-math.degrees(math.atan(tan90x))
print("{:.10f}".format(ans))

Submission status: Accepted

Solution code:
from math import atan,degrees
a,b,x=map(int, input().split())
ans=None
V=(a**2)*b
if x>=V/2:
  #S=(x/a**2*b)*a*b
  #S=0.5*a*y
  #y=2S/a
  #tan(ans)=y/a
  #atan(y/a)=ans
  S=((V-x)/V)*a*b
  y=2*S/a
  ans=degrees(atan(y/a))
  #print(S, y, ans)
else:
  #S=(x/a**2*b)*a*b
  #S=0.5*b*y
  #y=2S/b
  #ans=90-atan(y/b)
  S=(x/V)*a*b
  y=2*S/b
  ans=90-degrees(atan(y/b))
  
print(ans)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from math import atan,tan,pi


def max_volume(theta, a, b):
    # 弧度法にする
    theta = (theta / 180) * pi
    if theta < atan(b / a):
        # 半分より上のパターン
        area = (a * b) - ((a * a * tan(theta)) / 2)
    else:
        area = b * (b / tan(theta)) / 2
    return area*a


def main():
    a, b, x = map(int, read().split())
    # ２分探索で角度を探していく
    left = 0
    right = 90

    # 問題条件の誤差が 10 ** -6なので1e-7まで探索
    while right - left > 1e-7:
        mid = (left + right) / 2
        if max_volume(mid, a, b) <= x:
            right = mid
        else:
            left = mid
    answer = (left + right) / 2
    print(answer)



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

from math import atan,tan,pi

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

def max_volume(theta):
    # 弧度法にする
    theta = theta/180*pi
    if theta<atan(b/a):
        # 半分より上のパターン
        area = a*b-a*a*tan(theta)/2
    else:
        area = b*(b/tan(theta))/2
    return area*a

left = 0 # おさまっている
right = 90 # あふれている
while right - left > 1e-7:
    mid = (left+right)/2
    if max_volume(mid) <= x:
        right = mid
    else:
        left = mid

answer = (left+right)/2
print(answer)