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: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) /a
 
  if y <= a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0:
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import math
a,b,x= map(int,input().split())
if x == 0:
    print(0)
    quit()
tan = (2/a)*(b-(x)/(a**2))
ans1 = math.degrees(math.atan(tan))
ans2 = math.degrees(math.atan((b**2)*a/(2*x)))

if a**(3)/2>x:
    print(ans2)
    quit()
print(ans1,ans2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, ns().split()))
ns = lambda: stdin.readline()

a, b, x = na()

ans = 0

V45 = (a*a*b)/2.0
if x >= V45:
    ans = math.degrees(math.atan( 2*((a*b) - (x/a) )))
else:
    ans = math.degrees(math.acos((2*x)/math.sqrt( (4*x*x) + (a*a*b*b*b*b))))
print(ans)

Submission status: Wrong Answer

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

mass = a*a*b

LOOPS = 30

# 45であふれる側
def func1(a, b, x):
    aa_2 = a*a/2
    mass = a*a*b
    
    deg = 45
    for i in range(LOOPS):
        # 傾けて減る量
        dis = a * np.tan(np.deg2rad(deg)) * aa_2
        if mass - dis <= x:
            deg -= 45/(2**(i+1))
        else:
            deg += 45/(2**(i+1))
    return deg

# 45で溢れない側　
def func2(a,b,x):
    ab_2 = a*b/2
    
    deg = 45
    for i in range(LOOPS):
        # 傾けて減る量
        wat = b * np.tan(np.deg2rad(deg)) * ab_2
        if wat <= x:
            deg += 45/(2**(i+1))
        else:
            deg -= 45/(2**(i+1))
    return 90-deg

dis = a * np.tan(np.deg2rad(45)) * aa_2
if mass - dis < x:
    res = func1(a,b,x)
else:
    res = func2(a,b,x)
print(res)

Submission status: Wrong Answer

Solution code:
import math

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

max_v = a * a * b
diff_v = max_v - x
side_area = a * b
target_area = diff_v / a
diff_area = target_area / side_area

target_x = 2 * target_area / a
ans = 0
if target_x > b / 2:
    ans += math.degrees(math.atan(a / b))
    target_x -= b
target_tan = target_x / a
print(math.degrees(math.atan(target_tan)) + ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

print(90-(x/a/a/b*90))

#print(90-math.degrees(math.atan(a/b)))

Submission status: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) /a
 
  if y < a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0 or y > b:
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
  
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import math
import numpy as np


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

first_height = x // (a * a)

y = b - first_height
tan_theta = 2 * y / a
theta = math.atan(tan_theta)
print(theta / np.pi * 180)

Submission status: Wrong Answer

Solution code:
import math

def solv(a, b, x):
    if x == a ** 2 * b:
        return 0
    elif x <= a**2 * b / 2:
        tanTheta = (2 * x) / (a * b ** 2)
    else:
        tanTheta = (a ** 3) / 2 * (a ** 2 * b - x)
    return 90 - math.degrees(math.atan(tanTheta))


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

Submission status: Wrong Answer

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

origin_high=x/(a*a)
kakudo=0
while True:
    kakudo+=0.001
    tanx = math.tan(math.radians(kakudo))
    maxhigh = (a*tanx)/2+origin_high
    if maxhigh>b:
        break

print(kakudo)

Submission status: Wrong Answer

Solution code:
import math

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

y = b - (x / a**2)
z = (4 * y**2 + a**2)**0.5

cos = (4*y**2 - a**2 - z**2) / (-2 * a * z)

theta = math.degrees(math.acos(cos))

print(theta)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) /a
 
  if y < a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0 or y > b:
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import numpy as np

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

print(np.degrees(np.arctan2(b-(x / a**2),a/2)))

Submission status: Wrong Answer

Solution code:
import math 
a, b, x=map(int, input().split())
if x<a*a*b/3:
    angle=180*math.atan(a*b*b/2/x)/math.pi
    print('{:.10f}'.format(angle))
if x>=a*a*b/3:
    angle=180*math.atan((b-(x/a**2))/a*2)/math.pi
    print('{:.10f}'.format(angle))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
#d = x / a**2	# 水の深さ
s = x / a	# 側面積

if a <= b:
  l = s * 2 / b	# 傾けた時（側面＝三角形）の底辺長
  print(math.degrees(math.atan(b/l)))
else:
  l = s * 2 / a - b	# 傾けた時（側面＝台形）の上辺長
  print(math.degrees(math.atan((b-l)/a)))

Submission status: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) /a
 
  if y < a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0 :
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import math

def main():
    a, b, x = list(map(int,input().split()))
    tmp = 2 / a * (b - x / (a * a))

    ans = math.atan(tmp) * 180 / math.pi
    if ans > 45.0:
        ans = math.atan(1 / (2 * x / (a * b * b))) * 180 / math.pi

    print(ans)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

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

x=X/(A*A)
x2=X/A

if(x2>=((A*B)/2)):
    #b2=B-(2*x2-A*B)/A
    #print(90*(b2/A))
    tmp=(2*A*A*B-2*X)
    tmp2=A*A*A
    print(round(math.degrees(math.atan(tmp/tmp2)),10))
else:
    a2=x2/B
    tmp=(A*B*B)
    tmp2=X
    print(round(math.degrees(math.atan(tmp/tmp2)),10))
#    print(90*(B/a2))
#    print(math.degrees(math.tan(B/a2)))

Submission status: Wrong Answer

Solution code:
import math
from scipy import optimize

def f1(sita,b,x):
    return b**2/8*math.sin(sita)*(3-math.cos(sita))-x


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ans = optimize.fsolve(f1,math.pi/8,args=(b,xx),epsfcn=10**-28)
        print(90-math.degrees(ans[0]/2))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
import math 
a, b, x=map(int, input().split())
if x<a*a*b/3:
    angle=180*math.atan(a*b*b/2/x)/math.pi
    print('{:.10f}'.format(angle))
if x>a*a*b/3:
    angle=180*math.atan((b-(x/a**2))/a*2)/math.pi
    print('{:.10f}'.format(angle))

Submission status: Wrong Answer

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

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

x_area = x / a

tana = b/a - (2*x_area - a*b) / (a*a)
alpha = numpy.arctan(tana)
#print(alpha)

alpha_deg = numpy.rad2deg(alpha)

print(alpha_deg)

Submission status: Wrong Answer

Solution code:
import math as m

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

x = float(x)
d_max = float(90)
d_min = float(0)
res = float(100)

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

while res > 10e-6:
    d_mid = (d_max+d_min)/2
    l1 = a*m.tan(d_mid/180*m.pi)
    if l1-b > 0:
        l2 = (l1-b)*m.tan((90-d_mid)/180*m.pi)
    else:
        l2 = 0
    v = a*(a*b - 1/2*a*l1 + 1/2*(l1-b)*l2)
    res = abs(x-v)
    if x - v < 0:
        d_min = d_mid
    else:
        d_max = d_mid
print(d_mid)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    A=(2*b-2*x/a**2)/a
    if A<=0.001:
        print(math.degrees(A-A**3/3+A**5/5))
    else:
        print(np.rad2deg(np.arctan((2*b-2*x/a**2)/a)))
else:
    B=b/(2*x/a/b)
    if B<=0.001:
        print(math.degrees(B-B**3/3+B**5/5))
    else:    
        print(math.degrees(math.atan2(b,2*x/(a*b))))

Submission status: Wrong Answer

Solution code:
import math

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

base_s = x/a

if base_s <= a*b/2:
  limit_h = 2*base_s/b
  ans = math.degrees(math.atan2(limit_h, b))
  
elif base_s > a*b/2:
  base_s = a*b-base_s
  limit_h = 2*base_s/a
  ans = math.degrees(math.atan2(limit_h, a))

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
pi=3.1415926535897932
a,b,x=map(int,input().split())
xs=b-x/(a**2)
#print(math.atan(a/xs)*180/pi)
print(90*(xs/b))

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    A=(2*b-2*x/a**2)/a
    if A<=0.0001:
        print(math.degrees(A-A**3/3+A**5/5))
    else:
        print(np.rad2deg(np.arctan((2*b-2*x/a**2)/a)))
else:
    B=b/(2*x/a/b)
    if B<=0.0001:
        print(math.degrees(B-B**3/3+B**5/5))
    else:    
        print(math.degrees(math.atan2(b,2*x/(a*b))))

Submission status: Wrong Answer

Solution code:
import math

a,b,x = map(int, input().split())
#余りの長さ
mod = b - (x / (a ** 2))
floor = a / 2

print(math.degrees(math.atan(mod / floor)))

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np

def main():
    input = sys.stdin.readline
    abx = list(map(np.float64, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
    else:
        y = (2 * x) / (a * a) - b
        if b - y != 0:
            tan = a / (b - y)
            theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
        else:
            theta = 90.


    print(theta)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

import math
c=(a*a*b-x)*2

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

Submission status: Wrong Answer

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

import math

y = 0

y = 2*x/(a*b)

print(90-math.degrees(math.atan(y/b)))

Submission status: Wrong Answer

Solution code:
import sys
import math

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [side, hight, X] = string_to_int(inputs[0])
    max_size = side * side * hight
    print(max_size, X)
    if max_size / X < 2:
        z = (2*X / (side*side)) - hight
        w = hight - z
        sheta = math.atan2(side, w)
        return 90 - math.degrees(sheta)

    else:
        tri_side = 2 * X / (side * hight)
        sheta = math.atan2(hight, tri_side)
        return math.degrees(sheta)


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math as m

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

x = float(x)
d_max = float(90)
d_min = float(0)
res = float(100)

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

while res > 10e-5:
    d_mid = (d_max+d_min)/2
    l1 = a*m.tan(d_mid/180*m.pi)
    if l1-b > 0:
        l2 = (l1-b)*m.tan((90-d_mid)/180*m.pi)
    else:
        l2 = 0
    v = a*(a*b - 1/2*a*l1 + 1/2*(l1-b)*l2)
    res = abs(x-v)
    if x - v < 0:
        d_min = d_mid
    else:
        d_max = d_mid
print(d_mid)

Submission status: Wrong Answer

Solution code:
import math

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

s = x / a

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

print(math.degrees(math.atan(z)))

Submission status: Wrong Answer

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

#print(x / (a**2))

#print(2*(a**2 * b - x) / a**3)

if (a* b**2) <= x:
    print(0)

else:

    if (x/a) > 2* x:
        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: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

tan_theta = 2.0 * (b / a - x / (a**3))
#print(tan_theta)
print(math.degrees(math.atan(tan_theta)))

Submission status: Wrong Answer

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

#print(x / (a**2))

#print(2*(a**2 * b - x) / a**3)

if (a* b**2) <= x:
    print(0)

else:

    if (x/a) >  x:
        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: Wrong Answer

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

bb=x/(a*a)
b1=((2*x)/(a**2))-b
if b1>0 and b1<bb:
    d=math.degrees(math.atan((2*b-(2*x)/(a*a))/a))
elif a*a*b/2 == x:
    d=math.degrees(math.atan(b/a))
else:
    d=math.degrees(math.atan(b/((2*x)/(a*b))))
print(d)

Submission status: Wrong Answer

Solution code:
import math


def calc1():
    if x >= V_div2:
        r = math.degrees(math.atan(2 * (V - x) / (a * a * a)))
        print(r)
    else:
        r = math.degrees(math.atan(2 * x / (a * a * a)))
        print(r)


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


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

if a >= b:
    calc1()
    exit()
else:
    calc2()
    exit()

Submission status: Wrong Answer

Solution code:
import math
from scipy import optimize

def f1(sita,b,x):
    return b**2/8*math.sin(2*sita)*(3-math.cos(2*sita))-x


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ans = optimize.fsolve(f1,math.pi/8,args=(b,xx),epsfcn=10**-28)
        print(90-math.degrees(ans[0]))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

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

#print(x / (a**2))

#print(2*(a**2 * b - x) / a**3)

if (a* b**2) >= x:
    print(0)

else:

    if (x/a) >  x:
        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: Wrong Answer

Solution code:
import math 

arr = input().split()
a = int(arr[0])
b = int(arr[1])
x = int(arr[2])
if b*a*a > x:
    ans1 = 90-math.atan(a*a*a/(2.0*(b*a*a-x)))/math.acos(-1)*180
else:
    ans1 = 0.0
ans2 = math.atan(a*b*b/2/x)/math.acos(-1)*180

print (ans1)
print (ans2)
if a*a*b/2 <= x:
    print (ans1)
else:
    print (ans2)

Submission status: Wrong Answer

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


a, b, x = read_ints()

S = x/a

import numpy as np
e_min = min(a, b)
if S < (e_min ** 2) / 2:
    # 水が三角形になる
    print(np.arctan((b*b)/(2*S))*180/np.pi)
else:
    # 水が△と平行四辺形になる
    print(np.arctan(2*(a*b-S)/(a*a)) * 180/np.pi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

tan = (2/a)*(b-(x)/(a**2))
ans1 = math.degrees(math.atan(tan))
ans2 = math.degrees(math.atan((b**2)*a/(2*x)))

if a < b:
    print(ans2)
    quit()
print(ans1)

Submission status: Wrong Answer

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

h = x/(a*a)
print(math.degrees(math.atan2((b-x/(a*a)),(a/2))))

Submission status: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) /a
 
  if y < a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0 :
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
  
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
if x == 0:
    print(0)

elif x == (a * a * b) / 2:
    print(45)

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

else:
    y = 20 / (a * b)
    print(math.degrees(math.atan(b / y)))

Submission status: Wrong Answer

Solution code:
import math

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

q = a*b*b/2/x
w = (2*b-2*x/a**2)/a

if q <= a:
  print(math.degrees(math.atan(q)))
else:
  print(math.degrees(math.atan(w)))

Submission status: Wrong Answer

Solution code:
import math as m

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

x = float(x)
d_max = float(90)
d_min = float(0)
res = float(100)
while res > 10e-3:
    d_mid = (d_max+d_min)/2
    l1 = a*m.tan(d_mid/180*m.pi)
    if l1-b > 0:
        l2 = (l1-b)*m.tan((90-d_mid)/180*m.pi)
    else:
        l2 = 0
    v = a*(a*b - 1/2*a*l1 + 1/2*(l1-b)*l2)
    res = abs(x-v)
    if x - v < 0:
        d_min = d_mid
    else:
        d_max = d_mid
print(d_mid)

Submission status: Wrong Answer

Solution code:
from sys import stdin
import numpy as np
from numpy import linalg as LA


a,b,x = [int(x) for x in stdin.readline().rstrip().split()]

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

if x >= (a**2)*b/2:
    takasa = b-(2*x-(a**2)*b)/(a**2)

    u = np.array([takasa,a])
    v = np.array([b,0])

    i = np.inner(u, v)
    n = LA.norm(u) * LA.norm(v)

    c = i / n
    j = np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))

    print(90-j)

else:
    takasa = 2*x/(a*b)
    u = np.array([b,takasa])
    v = np.array([b,0])

    i = np.inner(u, v)
    n = LA.norm(u) * LA.norm(v)

    c = i / n
    j = np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))

    print(90-j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math 

def make_y(kaku):
    shita = math.radians(kaku)
    c = a * math.tan(shita)
    y = ((a * c) / 2) * a
    return y

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

for i in range(0, 91):
    y = make_y(i)
    if l - y < x:
        print(i-1)
        break

Submission status: Wrong Answer

Solution code:
import numpy as np


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

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

Submission status: Wrong Answer

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

import math

def f1(d,H,h):
    if h == H:
        return 0
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
v=a*a*b
if v <= 2*x:
    b1=(v-x)/a*2/a
    c=math.sqrt(a**2+b1**2)
    print(math.degrees(math.acos(a/c)))
else:
    a1=((x/a)*2)/b
    c=math.sqrt(a1**2+b**2)
    print(math.degrees(math.acos(b/c)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import math
import numpy as np

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

Y = a * a * b - x
h = (2 * Y) / (a * a)

# ans = np.arctan2(h, a) * 180 / np.pi
ans = np.arctan2(h, a)
ans = np.rad2deg(ans)
# ans = math.degrees(ans)

if ans > 45.0:
    h = (2 * x) / (a * b)
    # ans = np.arctan2(b, h) * 180 / np.pi
    ans = np.arctan2(b, h)
    ans = np.rad2deg(ans)
    # ans = math.degrees(ans)

print(ans)

Submission status: Wrong Answer

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

taiseki = b * a ** 2

rate = x / taiseki

print(90 * (1 -  rate))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

if a == b:
  atan1 = 45
  
elif a > b:
  y = ( 2 * x / b ) ** 0.5
 
  if y < a:
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
  else :
    y = (2 * x / (a * a)) - b
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = (2 * x / (a * a)) - b
  
  if y < 0 :
    y = ( 2 * x / b ) /a
    ans = y/b
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
    
  else:
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
  
  
print(atan1)

Submission status: Wrong Answer

Solution code:
import math

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

div = (x/(a*a))/b
print(div)
wide = div * a
print(wide)
bottom = wide * 2.0
print(bottom)
if bottom <= a:
    print(math.degrees(math.atan2(b,bottom)))
else :
    high = (b - (x/(a*a)))*2
    print(math.degrees(math.atan2(high,a)))

Submission status: Wrong Answer

Solution code:
import math 

arr = input().split()
a = int(arr[0])
b = int(arr[1])
x = int(arr[2])
if b*a*a > x:
    ans1 = 90-math.atan(a*a*a/(2.0*(b*a*a-x)))/math.acos(-1)*180
else:
    ans1 = 0.0
ans2 = math.atan(a*b*b/2/x)/math.acos(-1)*180

if ans1 <= 45.0:
    print (ans1)
else:
    print (ans2)

Submission status: Wrong Answer

Solution code:
a, b, x = map(int, input().split())
if (a**2)*b/2 < x:
    p = 2*b -(2*x)/(a**2)
    q = a
elif (a**2)*b/2 == x:
    p = 1
    q = 1
else:
    c = 2*x/a
    q = c/((c**2 + b**2)**(1/2))
    p = (b**2 - q**2)**(1/2)

import math
print(90-math.degrees(math.atan2(q, p)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
import sys,math
def input():
    return sys.stdin.readline()[:-1]


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

t = x/(a**2)
half = b/2
if t<half:
    a_2 = x/b
    b_2 = b
else:
    a_2 = a
    b_2 = (b-t)*2
c = (a_2**2+b_2**2)**0.5
cos1 = ((a_2**2)+(c**2)-(b_2**2))/(2*a_2*c)
print(math.degrees(math.acos(cos1)))

Submission status: Wrong Answer

Solution code:
from math import atan, pi

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

h = x / a**2


border = a**2 * b / 2

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

print(theta)

Submission status: Wrong Answer

Solution code:
import math


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

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


if __name__ == '__main__':
    main()