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())

def calc(theta):
    h = math.tan(theta) * a
    if h <= b:
        s = 1 / 2 * a * a * h
    else:
        c = h - b
        s = 1 / 2 * a * a * h
        s = s - s * ((c / h) ** 2)
    return s

l, r = 0.0, math.pi / 2
while abs(r - l) > 1e-12:
    m = (l + r) / 2
    rem = a * a * b - calc(m)
    print(l, r, calc(m), rem, m * 180 / math.pi)
    if rem >= x:
        l = m
    else:
        r = m
print(l * 180 / math.pi)

Submission status: Wrong Answer

Solution code:
import math


def calc(t):
    t = math.radians(t)
    if a * math.tan(t) <= b:
        return a * a * b - a * a * a * math.tan(t) / 2
    else:
        return b * b / math.tan(t) * a / 2


a, b, x = map(int, input().split(" "))
n_max = 90
n_min = 0
for _ in range(100000):
    print(n_max, n_min)
    n_mid = n_min + (n_max - n_min) / 2
    if calc(n_mid) < x:
        n_max, n_min = n_mid, n_min
    else:
        n_max, n_min = n_max, n_mid
print(n_mid)

Submission status: Wrong Answer

Solution code:
from math import atan as arctan
from math import degrees


def main():
    a, b, x = map(int, input().split(" "))
    bottom_area = x / a
    if bottom_area >= a * b / 2:
        print(abs(degrees(arctan((2 * x / (a ** 3)) - (2 ** b / a)))))
    else:
        print(90 - degrees(arctan(2 * x / a / (b ** 2))))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from math import atan as arctan
from math import degrees


def main():
    a, b, x = map(int, input().split(" "))
    bottom_area = x / a
    if bottom_area == a * b / 2:
        print("45.0000000000")
    elif bottom_area > a * b / 2:
        print(abs(degrees(arctan((2 * x / (a ** 3)) - (2 ** b / a)))))
    else:
        print(max(90 - degrees(arctan(2 * x / a / (b ** 3))),degrees(arctan(2 * x / a / (b ** 3)))))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from math import atan as arctan
from math import degrees


def main():
    a, b, x = map(int, input().split(" "))
    bottom_area = x / a
    if bottom_area == a * b / 2:
        print("45.0000000000")
    elif bottom_area > a * b / 2:
        print(abs(degrees(arctan((2 * x / (a ** 3)) - (2 ** b / a)))))
    else:
        print(90 - degrees(arctan(2 * x / a / (b ** 3))))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math


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

theta = 0
if x >= a * a * b * 0.5:
    theta = math.degrees(math.atan((2.0 * (a * a * b - x)) / (a ** 3.0)))
else:
    theta = math.degrees(math.atan((a * b * b) / 2.0 * x))

print(theta)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

h = c/a**2
print(round(degrees(atan(2*(b-h)/a)), 10))

Submission status: Wrong Answer

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

h = c/a**2
print(degrees(atan(2*(b-h)/a)))

Submission status: Wrong Answer

Solution code:
import sys
from collections import defaultdict, deque
import bisect
from heapq import *
import math
sys.setrecursionlimit(200000)
input = sys.stdin.readline

A, B, X = map(int, input().split())
# N = int(input())
# L = [int(v) for v in input().split()]
# L = [[int(v) for v in input().split()] for _ in range(N)]
# L = [int(input()) for _ in range(N)]
# L = [list(input().strip())  for _ in range(N)]
# S = input().strip()

t = (A ** 2) * B

if t / 2 <= X:
    m = ((A ** 2 * B) - X) / (A ** 2) * 2
    a = (m ** 2 + A ** 2) ** 0.5
    print(math.degrees(math.acos(A/a)))
else:
    m = X / (A * B)
    a = (m ** 2 + B ** 2) ** 0.5
    print(90 - math.degrees(math.acos(B/a)) * 2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

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

print(theta)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

x = x / a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a, b, x = map(int,input().split())
#水筒に入る水の体積V
V = (a**2) * b
#ans = 90.0 * (1.0 - x/V)
#xがVの半分以上の場合
if V / 2 <= x:
    f = 2*(V - x) / a ** 3
    print(math.degrees(math.atan(f)))
#xがVの半分以下の場合
else:
    f = 2*x / (V)
    print(90 - math.degrees(math.atan(f)))

Submission status: Wrong Answer

Solution code:
import math
a, b, x = map(int,input().split())
V = (a**2) * b
#ans = 90.0 * (1.0 - x/V)
#水量xの高さを求める
l = x / (a * a)
#水量xの高さが水筒の高さの半分以下の時
if l <= b/2.0:
    f = b**(2.0/(2.0*a*l))
else:
    f = 2.0*(b-l)/a 
ans = math.degrees(math.atan(f))
    
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import math
n= [int(i) for i in input().split()];
#print(n);

atan = math.degrees(math.atan(2*n[2] / (n[0] *n[1]*n[1]) ));
#print(math.pi);
print(90-atan);

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
from math import atan,pi
def resolve():
    a,b,x=map(int,input().split())
    if(x<=a*b*b/2):
        print(atan((a*b*b)/(2*x))*180/pi)
    else:
        print(atan(2*(a*a*b-x)/(a**3))*180/pi)
resolve()

Submission status: Wrong Answer

Solution code:
import numpy as np

def search_arctan(tan):
    low = 0
    high = np.radians(90)
    while (high-low>=10**(-12)):
        mid = (low+high)/2 
        print(mid)
        if np.tan(mid)<=tan:
            low = mid
        else:
            high = mid
    return np.rad2deg(mid)

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

l = x/(a*a)

if l<=b/2.0:
    ans = search_arctan(b**2.0/(2.0*a*l))
else:
    ans = search_arctan(2.0*(b-l)/a)

print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

xdash = x / a
FULL = a * b

if xdash == FULL:
    print(0)
elif FULL / 2 == xdash:
    print(math.degrees(math.atan(b/a)))
elif FULL / 2 > xdash:
    print(math.degrees(math.atan(b*b/xdash/2)))
else:
    print(math.degrees(math.atan((a*b-xdash)*a*a/2)))

Submission status: Wrong Answer

Solution code:
from math import radians, degrees, atan, pi


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

t = 2 / (a ** 3) * (b * a ** 2 - x)
theta = atan(t)

print(degrees(theta))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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

    h = (2/a) * ((a*b) - (x/a))
    r = math.atan2(h, a)
    ans = r * 180 / math.pi
    print(ans)




if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from math import atan, degrees

[astr, bstr, cstr] = sys.stdin.readline().split(" ")
a = int(astr)
b = int(bstr)
x = int(cstr)

theta = float(0)
threshold = a * a * a / 2

if threshold < x:  # 角より上
    theta = (2 * (a*a*b - x)) / (a*a*a)
else:
    theta = (x / a * b * b)

rad = atan(theta)
print(degrees(rad))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, h, V = map(int, input().split())
import math


if 2* V >= a**2 * h:
    theta = math.atan((h-V/a**2) * 2/ a)
else:
    theta = math.atan(a*h*h*2 / V)

print(theta*180/math.pi)

Submission status: Wrong Answer

Solution code:
a, h, V = map(int, input().split())
import math


if 2* V >= a**2 * h:
    theta = (h-V/a**2) * 2/ a
else:
    theta = a*h*h*2 / V

print(theta*180/math.pi)

Submission status: Wrong Answer

Solution code:
import numpy as np

a, b, x = map(float, input().split(" "))
print(np.arctan(2 / a * (b - x / (a ** 2))) / np.pi * 180)

Submission status: Wrong Answer

Solution code:
import numpy as np

a, b, x = map(float, input().split(" "))
print(np.arctan(2 * b / a - 2 * x / (a ** 3)) / np.pi * 180)

Submission status: Wrong Answer

Solution code:
import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    # deg90_in_rad = math.radians(90)
    # a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    # b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    # if b_sect >= 0:
    #     sqr_a = a * b_sect 
    #     tri_a = (b-b_sect)*a*1/2  

    # else:
    #     sqr_a = 0
    #     tri_a = (a - a_sect) * b *1/2
    # total_area = (sqr_a + tri_a) 

    if b*math.tan(math.pi/2-rad) <= a:
        total_area = (b*math.tan(math.pi/2-rad)*b*1/2)
    if b*math.tan(math.pi/2-rad)>a:
        total_area = (a*b - a*math.tan(rad)*a*1/2)       

    return total_area * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x >= -10 ** -12 and y - x <= 0:
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        print(deg, y-x)
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # if b*math.tan(math.pi/2-rad)>a:
    #     return (a*b - a*math.tan(rad)*a*1/2) *a
    # else:
    #     return (b*math.tan(rad/2-rad)*b*1/2)*a
    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x <= 0 and y - x >= -10 ** -12 :
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # if b*math.tan(math.pi/2-rad)>a:
    #     return (a*b - a*math.tan(rad)*a*1/2) *a
    # else:
    #     return (b*math.tan(rad/2-rad)*b*1/2)*a
    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x <= 0 and y - x >= -10 ** 20 :
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:

import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # if b*math.tan(math.pi/2-rad)>a:
    #     return (a*b - a*math.tan(rad)*a*1/2) *a
    # else:
    #     return (b*math.tan(rad/2-rad)*b*1/2)*a
    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y - x <= 0 and y - x >= -10 ** 20 :
            print(y-x, y, x, deg)
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if abs(y - x) < 10**-7:
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if abs(y - x) < 10**-12:
            break
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math
# Calculate amount of water that won't oveflow
def calc(a,b,deg): 
    
    rad = math.radians(deg)
    deg90_in_rad = math.radians(90)
    a_sect = a*math.sin(rad) - b*math.sin(deg90_in_rad - rad)
    b_sect = b*math.sin(deg90_in_rad - rad) - a*math.sin(rad) # 縦と水の切片

    if b_sect >= 0:
        sqr_a = a * b_sect 
        tri_a = (b-b_sect)*a*1/2  

    else:
        sqr_a = 0
        tri_a = (a - a_sect) * b *1/2

    # print(a_sect, b_sect)
    return (sqr_a + tri_a) * a

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

    left = 0
    right = 90
    deg = 45
    while True:
        y = calc(a, b, deg)
        if y > x:
            deg, left = (right+deg)/2, deg
        elif y < x:
            deg, right = (left+deg)/2, deg
        
        if abs(y - x) < 10**-7:
            break
    print(deg)

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
c=2*x/(a*b)
print(math.atan(b/c)/(2*math.pi)*360)

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
c=2*x/(a*b)
print(math.atan(c/b)/(2*math.pi)*360)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

    print(math.degrees(theta))

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

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

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

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

print(math.degrees(theta))

Submission status: Wrong Answer

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

h = x / (a**2)

c = a/2
d = b - h
l = (c**2 + d**2)**(1/2)

theta = math.asin(c/l)
pi = np.pi

print(np.rad2deg(theta))

Submission status: Wrong Answer

Solution code:
import math


def solve(a: int, b: int, x: int) -> float:
  return math.degrees(math.atan(a * b**2 / (2*x)))


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

print(solve(a, b, x))

Submission status: Wrong Answer

Solution code:
import math

def calcAgree(n):
    [a,b,x] = n

    # 傾けた時のbと直角を成す線分の長さを求める
    length1 = x/a/b*2
    length2 = (b**2+length1**2)**0.5

    target_angle = math.acos(length1/length2)
    
    return target_angle / (2*math.pi) * 360

input_data = [int(x) for x in input().split()]

print(calcAgree(input_data))

Submission status: Wrong Answer

Solution code:
import math

input_data = list(map(int, input().split()))
volume = input_data[2] ** 2
c = volume / input_data[0] / input_data[1]
rad = math.atan2(c, input_data[1])
deg = rad * 180 * math.pi
print(deg)

Submission status: Wrong Answer

Solution code:
import math

input_data = list(map(int, input().split()))
volume = input_data[2] ** 2
c = volume / input_data[0] / input_data[1]
rad = math.atan2(c, input_data[1])
deg = rad * 2 * math.pi
print(deg)

Submission status: Wrong Answer

Solution code:
import math

input_data = list(map(int, input().split()))
volume = input_data[2] ** 2
c = volume / input_data[0] / input_data[1]
deg = math.atan2(c, input_data[1])
print(deg)

Submission status: Wrong Answer

Solution code:
import math

def calcAgree(n):
    [a,b,x] = n

    # 傾けた時のbと直角を成す線分の長さを求める
    length1 = x/a/b*2
    length2 = (b**2+length1**2)**0.5

    target_angle = math.acos(length1/length2)
    
    return target_angle / (2*math.pi) * 360

input_data = [int(x) for x in input().split()]
print(input_data)

print(calcAgree(input_data))

Submission status: Wrong Answer

Solution code:
from math import atan, pi

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print(str((90 - (math.degrees(math.acos((b) / (math.sqrt((4 * x * x) / (a * a * b * b) + b * b))))))))

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print((90 - (math.degrees(math.acos(((2*x)/a*b)/(math.sqrt(((4*x*x)/a*a*b*b)+b*b)))))))

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print(str(((math.degrees(math.acos((b)/(math.sqrt(4*x*x/(a*a*b*b)+b*b))))))))

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print(str((90 - (math.degrees(math.acos((b)/(math.sqrt(4*x*x/(a*a*b*b)+b*b))))))))

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print(str((90 - (math.degrees(math.acos((b)/(math.sqrt((4*x**2)/(a**2*b**2)+b**2))))))))

Submission status: Wrong Answer

Solution code:
import math

rawUsrInput = input()
usrInput = rawUsrInput.split()

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

print(math.degrees(math.acos((b)/(math.sqrt((4*x**2)/(a**2*b**2)+b**2)))))

Submission status: Wrong Answer

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

#a = usrInput[0]
#b = usrInput[1]
#x = usrInput[2]

# cosAlpha = (b/math.aqrt((2*x)**2/a**2*b**2+b**2))

print(math.degrees(math.acos((b)/(math.sqrt((2*x)**2/a**2*b**2+b**2)))))

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

def volume(a,b,x):
  k = 2*(b/a-x/(a**3))
  print(math.degrees(math.atan(k)))
  
a,b,x = map(int,input().split())
volume(a,b,x)

Submission status: Wrong Answer

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

left = 0
right = math.pi*0.5

for i in range(10000):
    mid = (left+right)/2
    t = math.tan(mid)
    if math.tan(mid) > a/b:
        volume = (b/t)*b*0.5*a
    else:
        volume = (a**2)*b - a*a*t*0.5*a
        
    if x > volume:
        right = mid
    else:
        left = mid

print(left*180/math.pi)

Submission status: Wrong Answer

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

left = 0
right = math.pi*0.5

for i in range(1000000):
    mid = (left+right)/2
    t = math.tan(mid)
    if math.tan(mid) > a/b:
        volume = (b/t)*b*0.5*a
    else:
        volume = (a**2)*b - a*a*t*0.5*a
        
    if x < volume:
        left = mid
    else:
        right = mid

print(left*180/math.pi)

Submission status: Wrong Answer

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

left = 0
right = math.pi*0.5

for i in range(10000):
    mid = (left+right)/2
    t = math.tan(mid)
    if t > a/b:
        volume = (b/t)*b*0.5*a
    else:
        volume = (a**2)*b - a*a*t*0.5*a
        
    if x < volume:
        left = mid
    else:
        right = mid

print(right*180/math.pi)

Submission status: Wrong Answer

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

left = 0
right = math.pi*0.5

for i in range(10000):
    mid = (left+right)/2
    t = math.tan(mid)
    if math.tan(mid) > a/b:
        volume = (b/t)*b*0.5*a
    else:
        volume = (a**2)*b - a*a*t*0.5*a
        
    if x < volume:
        left = mid
    else:
        right = mid

print(left*180/math.pi)

Submission status: Wrong Answer

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

left = 0
right = math.pi*0.5

for i in range(100):
    mid = (left+right)/2
    t = math.tan(mid)
    if math.tan(mid) > a/b:
        volume = (b/t)*b*0.5*a
    else:
        volume = (a**2)*b - a*a*t*0.5*a
        
    if x < volume:
        left = mid
    else:
        right = mid

print(left*180/math.pi)

Submission status: Wrong Answer

Solution code:
a,b,x=map(int,input().split())
import math
pii=math.pi
y=2*x/(b*a)
tantheta=b/y
ans=math.atan(tantheta)*(360/(2*pii))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

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

s=a*a
maxl=s*b
seg=maxl-x
unchi=2*seg/(a*s)
ans=math.atan(2*seg/(a*s))
print(ans/pi*180)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

a,b,x = map(int, input().split())
water_height = x/a**2
triangle_height = (b-water_height)*2
water_line = (a**2+triangle_height**2)**0.5
degrees = math.degrees(math.acos(a/water_line))

print(degrees)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
from math import tan, pi
eps = 10**(-8)

def binary_search(a, b, x):
    l = pi / 2
    r = 0.0
    if x <= a ** 2 * b:
        while l - r > eps:
            mid = (r + l) / 2
            if a * b**2 / tan(mid) / 2 == x:
                return x
            elif a * b**2 / tan(mid) / 2 > x:
                r = mid
            else:
                l = mid
        return l
        
    else:
        while l - r > eps:
            mid = (r + l) / 2
            if a**2 * b - a**3 / tan(mid) == x:
                return x
            elif a**2 * b - a**3 / tan(mid) > x:
                r = mid
            else:
                l = mid
        return l

a, b, x = map(int, input().split())
print(binary_search(a, b, x) * 180 / pi)

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