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:
# ABC144d


def main():
    import sys
    import math
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# ABC144d


def main():
    import sys
    import math
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import numpy as np
A,B,X=map(int,input().split())
X/=A
if A*B/2>=X:
	print(np.rad2deg(np.arctan(2*(A*B-X)/(A*A))))
else:
    print(np.rad2deg(np.arctan(B*B/(2*X))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math

if x < a*a*b*0.5:
  print(90-math.atan(x/b/b/a)*360/math.pi)
else:
  y = a*a*b-x
  print(90-math.atan(y/a/a/a)*360/math.pi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    a,b,x = inputMap()
    
    tmp = a*a
    m_H = x / tmp
    
    amari_H = b - m_H
    S = amari_H * a
    
    xx = 2*S / a
    
    tmp = math.atan(xx/a)
    print(math.degrees(tmp))
    
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
import math

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

deg = 0
enp = a*a*b - x

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

Submission status: Wrong Answer

Solution code:
import math

x, y, z = map(int,input().split())

volume = x ** 2 * y
rest = volume - z

if z == volume:
  print(0)
elif rest < z / 2: 
  tan = (rest / (x ** 2)) * 2.0 / x
  print(math.degrees(math.atan(tan)))
else:
  tan =  (x * (y ** 2)) / (2 * z)
  print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

Solution code:
import math

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

deg = 0
enp = a*a*b - x

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

Submission status: Wrong Answer

Solution code:
#abc144d
import math

a,b,x=map(float,raw_input().split())
if x/a>a*b/2:
 res=(b*2)/a-(x*2)/(a**2)
else:
 res=a*b**2/(x*2)
print math.degrees(math.atan(res))

Submission status: Wrong Answer

Solution code:
#abc144d
import math

a,b,x=map(float,raw_input().split())
if x/a>a*b/2:
 res=(b*2)/a-(x*2)/(a**3)
else:
 res=a*a**2/(x*2)
print math.degrees(math.atan(res))

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 deg

if x > a*a*b/2:
    res = func1(a,b,x)
else:
    res = func2(a,b,x)
print(res)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_rad_overhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        #if a * a * math.tan(m) > (a * b - s) * 2.0:
        if a * math.tan(m) > 2.0 * (b - s / a):
            r = m
        else:
            l = m
    return l

def search_rad_underhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        if b * b * math.tan(m) > s * 2.0:
            r = m
        else:
            l = m
    return math.pi / 2.0 - l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2.0:
        # 半分未満の時
        rad = math.atan2(b * b, 2.0 * s)
        #rad = search_rad_underhalf(a, b, s)
    else:
        # 半分以上の時
        #rad = math.atan2(2.0 * (b - s / a), a)
        rad = search_rad_overhalf(a, b, s)
    return math.degrees(rad)

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math as m

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

z = a * b
s = x / a

if z / 2 >= s:
  ap = 2 * s / b
  at = m.degrees(m.atan2(b,ap))
  print(at)
else:
  bp = 2 * (a * b - s)
  bt = m.degrees(m.atan2(bp,a))
  print(bt)

Submission status: Wrong Answer

Solution code:
import math as m

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

z = a * b
s = x / a

if z / 2 >= s:
  ap = 2* s / b
  at = m.degrees(m.atan(b/ap))
  print(at)
else:
  bp = 2 * (a * b - s)
  bt = m.degrees(m.atan(bp/a))
  print(bt)

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_rad_overhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        if a * a * math.tan(m) > (a * b - s) * 2.0:
            r = m
        else:
            l = m
    return l

def search_rad_underhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2.0
        if b * b * math.tan(m) > s * 2.0:
            r = m
        else:
            l = m
    return math.pi / 2.0 - l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2.0:
        # 半分未満の時
        rad = math.atan2(b * b, 2.0 * s)
        #rad = search_rad_underhalf(a, b, s)
    else:
        # 半分以上の時
        rad = search_rad_overhalf(a, b, s)
    return math.degrees(rad)

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_rad_overhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2
        if a * a * math.tan(m) > (a * b - s) * 2.0:
            r = m
        else:
            l = m
    return l

def search_rad_underhalf(a, b, s):
    l = 0.0
    r = math.pi / 4.0
    while r - l > 1e-12:
        m = (l + r) / 2
        if b * b * math.tan(m) > s * 2.0:
            r = m
        else:
            l = m
    return math.pi / 2.0 - l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2.0:
        # 半分未満の時
        rad = search_rad_underhalf(a, b, s)
    else:
        # 半分以上の時
        rad = search_rad_overhalf(a, b, s)
    return math.degrees(rad)

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_rad(a, b, s):
    l = 0.0
    r = math.pi / 4
    while r - l > 1e-12:
        m = (l + r) / 2
        if a * a * math.tan(m) / 2 > s:
            r = m
        else:
            l = m
    return l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2:
        # 半分未満の時
        rad = math.pi / 2 - search_rad(b, a, s)
    else:
        # 半分以上の時
        rad = search_rad(a, b, (a*b-s))
    return math.degrees(rad)

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_rad(a, b, s):
    l = 0.0
    r = math.pi / 4
    while r - l > 1e-10:
        m = (l + r) / 2
        if a * a * math.tan(m) / 2 > s:
            r = m
        else:
            l = m
    return l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2:
        # 半分未満の時
        rad = math.pi / 2 - search_rad(b, a, s)
    else:
        # 半分以上の時
        rad = search_rad(a, b, (a*b-s))
    return math.degrees(rad)

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_deg(a, b, s):
    l = 0.0
    r = 45.0
    while r - l > 1e-10:
        m = (l + r) / 2
        if a * a * math.tan(math.radians(m)) / 2 > s:
            r = m
        else:
            l = m
    return l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2:
        # 半分未満の時
        deg = 90.0 - search_deg(b, a, s)
    else:
        # 半分以上の時
        deg = search_deg(a, b, (a*b-s))
    return deg

if __name__ == '__main__':
    inputs = read()
    print("%.10f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def f(a, b, angle):
    if (a * math.tan(math.radians(angle))) <= b:
        return ((a * b) - (a * math.tan(math.radians(angle)) * a / 2.0)) * a
    else:
        return b + b / math.tan(math.radians(angle)) * a / 2.0

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

l, r = 0, 90
for i in range(100):
    mid = (l+r) / 2.0
    x = f(a, b, mid)
    if c < x:
        l = mid
    else:
        r = mid
print(l)

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_deg(a, b, s):
    l = 0.0
    r = 45.0
    for i in range(10000):
        m = (l + r) / 2
        if a * a * math.tan(math.radians(m)) / 2 > s:
            r = m
        else:
            l = m
    return l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2:
        # 半分未満の時
        deg = 90.0 - search_deg(a, b, s)
    else:
        # 半分以上の時
        deg = search_deg(a, b, (a*b-s))
    return deg

if __name__ == '__main__':
    inputs = read()
    print("%.8f" % solve(*inputs))

Submission status: Wrong Answer

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def search_deg(a, b, s):
    l = 0.0
    r = 45.0
    for i in range(100):
        m = (l + r) / 2
        if a * a * math.tan(math.radians(m)) / 2 > s:
            r = m
        else:
            l = m
    return l


def solve(a, b, x):
    s = x / a
    if x < a * a * b / 2:
        # 半分未満の時
        deg = 90.0 - search_deg(a, b, s)
    else:
        # 半分以上の時
        deg = search_deg(a, b, (a*b-s))
    return deg

if __name__ == '__main__':
    inputs = read()
    print("%.8f" % solve(*inputs))

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

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

Submission status: Wrong Answer

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

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)
tmp2 = ((2*x)/b)**(1/2)

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

Submission status: Wrong Answer

Solution code:
import math


def main():
    a, b, x = map(int, input().split())
    h = x / a ** 2
    rad = 0
    if h >= (b / 2):
        rad = math.atan(b - h / a)
    else:
        u = x / b ** 2 * 2
        rad = math.atan(b / u)
    print(math.degrees(rad))


if __name__ == '__main__':
    main()

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

Submission status: Wrong Answer

Solution code:
def main():
    N, K, *I = map(int, open(0).read().split())
    A, F = I[:N], I[N:]

    A.sort()
    F.sort(reverse=True)

    ng, ok = -1, 10 ** 12
    while abs(ok - ng) > 1:
        mid = (ok + ng) // 2
        if sum(max(0, a - mid // f) for a, f in zip(A, F)) <= K:
            ok = mid
        else:
            ng = mid

    print(ok)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

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

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

print(theta)

Submission status: Wrong Answer

Solution code:
import math

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

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

print(theta)

Submission status: Wrong Answer

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

def keisan(d):
    if tan(d) > b/a:
        return a*a*(b+b-a/tan(d))/2
    else:
        return (b*b*tan(d)*a)/2

hi = pi/2
lo = 0
while hi-lo > 0.0000000001:
    mid = (hi+lo)/2
    if keisan(mid) < x:
        lo = mid
    else:
        hi = mid
ans = 90.0-degrees(lo)
print(ans if ans > 0.000001 else 0)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def keisan(d):
    if tan(d) > b/a:
        return a*a*(b+b-a/tan(d))/2
    else:
        return (b*b*tan(d)*a)/2

hi = pi/2
lo = 0
while hi-lo > 0.000000000000001:
    mid = (hi+lo)/2
    if keisan(mid) < x:
        lo = mid
    else:
        hi = mid
print(90-degrees(lo))

Submission status: Wrong Answer

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

def keisan(d):
    if tan(d) > b/a:
        return a*a*(b+b-a/tan(d))/2
    else:
        return (b*b*tan(d)*a)/2

hi = pi/2
lo = 0
while hi-lo > 0.0000000001:
    mid = (hi+lo)/2
    if keisan(mid) < x:
        lo = mid
    else:
        hi = mid
print(90-degrees(lo))

Submission status: Wrong Answer

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

#case
if x <= a**2*b/2: #底ケース
	w = 2*x/(a*b)
	ans =math.degrees(math.atan(b/w)) #*180/math.pi
	ans = 90-ans


else: #側面ケース
	now_h = (2*x)/(a**2) - b
	ans = math.atan((b-now_h)/a)
	ans = 180*ans/math.pi


print(ans)

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

Submission status: Wrong Answer

Solution code:
from numpy import double
from numpy import tan
from numpy import pi


def solve(t):
    l = double(0)
    r = double(90)
    t_pred = double(-1e10)
    if abs(t_pred - t) > 1e-6:
        mid = (l + r) / 2.0
        t_pred = tan(pi*(2*mid/360))
        if t_pred > t:
            r = mid  # 溢れる
        else:
            l = mid  # 溢れない
    return l


if __name__ == '__main__':
    a, b, x = map(int, input().split())
    if a*a*b / 2 >= x:
        print(solve(double(a*b*b)/(x*2)))
    else:
        print(solve(90-double(a*a*b)/((a*a*b-x)*2)))

Submission status: Wrong Answer

Solution code:
from numpy import double
from numpy import tan
from numpy import pi


def solve(t):
    l = double(0)
    r = double(90)
    t_pred = double(-1e10)
    if abs(t_pred - t) > 1e-6:
        mid = (l + r) / 2.0
        t_pred = tan(pi*(2*mid/360))
        if t_pred > t:
            r = mid  # 溢れる
        else:
            l = mid  # 溢れない
    return l


if __name__ == '__main__':
    a, b, x = map(int, input().split())
    if a*a*b / 2 >= x:
        print(solve(double(a*b*b)/(x*2)))
    else:
        print(solve(90-double(a*a*b)/(x*2)))

Submission status: Wrong Answer

Solution code:
from numpy import double
from numpy import tan
from numpy import pi


def solve(t):
    l = double(0)
    r = double(90)
    t_pred = double(-1e10)
    if abs(t_pred - t) > 1e-6:
        mid = (l + r) / 2.0
        t_pred = tan(pi*(2*mid/360))
        if t_pred > t:
            r = mid  # 溢れる
        else:
            l = mid  # 溢れない
    return l


if __name__ == '__main__':
    a, b, x = map(int, input().split())
    if a*a*b / 2 > x:
        print(solve(double(a * a * b) / (x * 2)))
    else:
        print(solve(double(a*b*b)/(x*2)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b,V=map(int,input().split())
s=V/a
if s<=a*b/2:
  t=round((a**3/(2*(a**2*b-V))),5)
else:
  t=round((2*V/(a*b**2)),5)

ans=math.degrees(math.atan(t))
print(90-ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
input = sys.stdin.readline


def main():
    a, b, x = map(int, input().split())
    b_d = (b - (x / a**2)) * 2
    atan = math.atan2(b_d, a)

    print(math.degrees(atan))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from numpy import double
from numpy import tan
from numpy import pi


def solve(t):
    r = double(90)
    l = double(0)
    t_pred = double(-1e10)
    if abs(t_pred - t) > 1e-6:
        mid = (l + r) / 2.0
        t_pred = tan(pi*(2*mid/360))
        if t_pred > t:
            r = mid  # 溢れる
        else:
            l = mid  # 溢れない
    return l


if __name__ == '__main__':
    a, b, x = map(int, input().split())
    if a * a * b / 2 > x:
        print(solve(double(a*b*b)/(x*2)))
    else:
        print(solve(double(a*a*b)/(x*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))
    atan1 = 90 - atan1
    
  else :
    y = b - (2 * x / (a * a))
    ans = a/(b-y)
    atan1 = math.degrees(math.atan(ans))
    atan1 = 90 - atan1
  
elif b > a:
  y = b - (2 * x / (a * a))
  
  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 math

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

y = a**2 * b

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

A, B, x = map(int, input().split())
'''
if x == A ** 2 * B:
    print(0)
    exit()

if x <= A * A * B / 2:
    S = x / A
    print(S)
    print('----')
    f = 2 * S / B
    print(f)
    print('----')
    print(math.degrees(math.atan(B / f)))
else:
    S = A * B - x / A
    f = 2 * S /A
    print(90 - math.degrees(math.atan(A / f)))
#A,B,x = map(int,input().split())
'''


fukasa = x / A ** 2
mizu_menseki = fukasa * A
zentai_menseki = B * A
amari_menseki = zentai_menseki - mizu_menseki
amari_takasa  = amari_menseki  * 2 / A
mizu_soko = mizu_menseki * 2 / B


'''
print(mizu_soko * B * 0.5)
print(mizu_menseki)
print('----')
print(A,fukasa,mizu_menseki,zentai_menseki,amari_menseki,amari_takasa,mizu_soko)

print('----')

print(math.atan2(1,3 ** 0.5))
print(math.degrees(math.atan2(1,3 ** 0.5)))

'''

if (A * A * B // 2) == x:
    print(45)
    print(math.degrees(math.atan(amari_takasa/A)))
elif (A * A * B / 2) < x:
    print(math.degrees(math.atan(amari_takasa/A)))
else:
    print(math.degrees(math.atan(B/mizu_soko)))

'''
taikakusen = A * 2**0.5
fukasa = x / A ** 2
mizu_menseki = fukasa * taikakusen
zentai_menseki = B * taikakusen
amari_menseki = zentai_menseki - mizu_menseki
amari_takasa  = amari_menseki  / (taikakusen * 0.5)
mizu_soko = mizu_menseki / (B * 0.5)

print(mizu_soko * B * 0.5)
print(mizu_menseki)
print('----')
print(taikakusen,fukasa,mizu_menseki,zentai_menseki,amari_menseki,amari_takasa,mizu_soko)

print('----')

print(math.atan2(1,3 ** 0.5))
print(math.degrees(math.atan2(1,3 ** 0.5)))

if (A * A * B // 2) == x:
    print(45)
    print(math.degrees(math.atan2(amari_takasa,taikakusen)))
elif (A * A * B / 2) > x:
    print(math.degrees(math.atan2(amari_takasa,taikakusen)))
else:
    print(90 - math.degrees(math.atan2(mizu_soko,B)))
'''

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

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

else:
    r=2*x/(a*b*b)

    print(const.convToDEG*math.atan(r))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=list(map(int,input().split()))
y=2*b-2*x/(a*a)
s=a/(math.sqrt(a*a+y*y))
asin=math.degrees(math.asin(s))
print(90-asin)

Submission status: Wrong Answer

Solution code:
import math

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

h = x / a / b * 2
ans = math.atan(b / h) * 180.0 / math.pi
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

a, b, x = map(int,input().split())
c = b-(x/a**2)
d = (a*b)/2

if c <= b//2:
    print(np.degrees(np.arctan2(b-(x / a**2),a/2)))
    
else:
    print(np.degrees(np.arctan2(b,(x/d))))

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

def judge(theta, a, b, V):
  theta_rad = math.radians(theta)
  tan = math.tan(theta_rad)
  y = (V - a**3*tan/2)/a**2
  if y >= 0.:
    if y+a*tan <= b:
      return True
    else:
      return False
  else:
    z = math.sqrt(V/tan/a*2)
    if z*tan <= b:
      return True
    else:
      return False

theta_eval = [0., 89.9999999999]

while theta_eval[1]-theta_eval[0] >= 1e-7:
  delta = [1.0, 1.0]
  while judge(theta_eval[0]+delta[0], a, b, V) == False or theta_eval[0]+delta[0] >= theta_eval[1]:
    delta[0] = delta[0]/2
  while judge(theta_eval[1]-delta[1], a, b, V) == True:
    delta[1] = delta[1]/2
  theta_eval[0] += delta[0]
  theta_eval[1] -= delta[1]

print(theta_eval)

Submission status: Wrong Answer

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

def judge(theta, a, b, V):
  theta_rad = math.radians(theta)
  tan = math.tan(theta_rad)
  y = (V - a**3*tan/2)/a**2
  if y >= 0.:
    if y+a*tan <= b:
      return True
    else:
      return False
  else:
    z = math.sqrt(V/tan/a*2)
    if z*tan <= b:
      return True
    else:
      return False

theta_eval = [0., 89.9999999999]

while theta_eval[1]-theta_eval[0] >= 1e-7:
  delta = [1.0, 1.0]
  while judge(theta_eval[0]+delta[0], a, b, V) == False or theta_eval[0]+delta[0] >= theta_eval[1]:
    delta[0] = delta[0]/2
  while judge(theta_eval[1]-delta[1], a, b, V) == True:
    delta[1] = delta[1]/2
  if theta_eval[0] >= 90:
    print(theta_eval)
  theta_eval[0] += delta[0]
  theta_eval[1] -= delta[1]

print(theta_eval)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

# ちょうど半分入っている時
if x == a*a*b/2:
    print(45.)

elif x == a*a*b:
    print(0.)
    
# 半分より多く入っている時 : theta<45
if x > a*a*b/2:
    tan = 2*(a*b - x/a) / (a**2)
    print(math.degrees(math.atan(tan)))

# 半分より少なく入っている時 : theta>45
else:
    tan = a * b * b / (2*x)
    print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

Solution code:
#D
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x >= w_p:
    theta = math.degrees(math.atan((2. * (((a ** 2) * b) - x)) / (a ** 3)))
else:
    theta = math.degrees(math.atan((a * (b ** 2))/ (2. * x)))
print(theta)

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:
    print('{:.14f}'.format(math.degrees(math.atan2(2*b-2*x/a**2,a))))
else:
    print('{:.14f}'.format(math.degrees(math.atan2(b,2*x/(a*b)))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


if __name__ == '__main__':
    main()