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

Submission status: Wrong Answer

Solution code:
import numpy as np

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

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

if x < 1/2*a*b:
    a1 = 2*x/(a*b)
    rad = np.arctan(a1/b)
else:
    y = 2*(b-x/a**2)
    rad = np.arctan(a/y)

print(90-rad*180/np.pi)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

a,b,x=map(int,input().split())
v=a*a*b-x
maxh=v/(a*a)*2
import math
print(math.degrees(math.atan(maxh/a)))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(float,input().split())
volume=a**2*b
if volume<x*2:
    sub=volume-x
    sub=sub/a*2/a
    print(sub)
    ans=math.degrees(math.atan(sub/a))
else:
    x=x/a*2/b
    ans=90.0-math.degrees((math.atan(x/b)))
print(round(ans,6))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import tan, atan2, pi, degrees


def f(theta):
    if theta < thres:
        return V - a ** 3 * tan(theta) / 2
    else:
        return a * b * b / tan(theta) / 2


eps = 1e-7
a, b, x = map(int, input().split())
V = a * a * b
thres = atan2(b, a)

bad, good = pi / 2, 0
while bad - good > eps:
    mid = (bad + good) / 2
    if f(mid) >= x:
        good = mid
    else:
        bad = mid
print(degrees(good))

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b,x = [ int(r) for r in input().split(' ') if len(r) > 0]

if 2*x >= a*b:
    # 半分より多い
    print(90-math.degrees((math.atan2(a,2*(b-x/a**2)))))
else:
    # 半分より少ない
    print(90-math.degrees(math.atan2((2*x)/(a*b),b)))

Submission status: Wrong Answer

Solution code:
# 参考:https://drken1215.hatenablog.com/entry/2020/04/26/193500 #
from math import pi
from math import atan
a,b,x = map(int,input().split())
x /= a
if x > a * b / 2:
    print(atan(2 * (a * b - x) / (a ** 2)) * 180 / pi)
if x <= a * b / 2:
    print(atan((b ** 2) / 2 * x) * 180 / pi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Sep  9 19:58:50 2020

@author: liang
"""
import math
a, b, x = map(int, input().split())

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

Submission status: Wrong Answer

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

ans = math.degrees(math.atan((b-x/a**2)/a*2))
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
#mod = 998244353
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
  return int(readline())
a,b,x = readInts()
x /= a
import math
PI = math.pi
if x > a*b // 2:
    print("{:.10}".format(math.atan2((a*b-x)*2, a*a)*180/PI))
else:
    print("{:.10}".format(math.atan2(b*b,2*2)*180/PI))

Submission status: Wrong Answer

Solution code:
from math import atan, degrees

def angle(a, b, x):
	return degrees(atan(((a * b ** 2) / ( 2 * x)) if x <= 0.5 * b * a ** 2 else ((2 * (a**2 - x) / (a ** 2)) / a)))
	
print(angle(*map(int, input().split())))

Submission status: Wrong Answer

Solution code:
from math import atan, degrees

def angle(a, b, x):
	return degrees(atan((a * b ** 2) / ( 2 * x) if x <= 0.5 * b * a ** 2 else (2 * (b - x / (a ** 2))) / b))
	
print(angle(*map(int, input().split())))

Submission status: Wrong Answer

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

A1 = 2*x/(a*b)
num = math.atan(b/A1)
print(math.degrees(num))

Submission status: Wrong Answer

Solution code:
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    a,b,x = i_map()
    water_y = x/a**2
    left_y = b-water_y
    half_x = a/2
    print(left_y/half_x)
    d = math.degrees(math.atan(left_y/half_x))
    print(d)


if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
import math

A, B, X = list(map(int, input().split()))
if X >= (A**2)*B / 2:
    print(math.degrees(math.atan2(2*((A**2)*B - X), A**3)))
else:
    print(math.degrees(math.atan2(A*B*B, X)))

Submission status: Wrong Answer

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

import math
if 0.5*a**2*b<=x:
    ans=math.atan(2*(1/(a**2)*(a*b-x/a)))
    ans=math.degrees(ans)
else:
    ans=math.atan((a*b**2)/(x/2))
    ans=math.degrees(ans)

print(round(ans,10))

Submission status: Wrong Answer

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

import math
if 0.5*a**2*b<=x:
    ans=math.atan(2*(1/(a**2)*(a*b-x/a)))
    ans=math.degrees(ans)
else:
    ans=math.atan((a*b**2)/(x/2))
    ans=math.degrees(ans)

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math

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


tan = ((a*a*b - x) * 2) / a**3


print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
from math import tan, radians
# input = stdin.readline

def solve(a,b,x):
  lower = (2*(a**2)*b-2*x)/(a**3)
  upper = a*(b**2)/(x*2)
  def judge(theta):
    assert 0 <= theta < 90
    if 0 < theta < 45:
      return tan(radians(theta)) <= lower
    else:
      return tan(radians(theta)) <= upper

  ok,ng = 0,90
  for _ in range(10000):
    mid = (ok + ng) / 2
    if judge(mid):
      ok = mid
    else:
      ng = mid
  
  return ok

def main():
  a,b,x = map(int,input().split())
  print(format(solve(a,b,x), '.10f'))
  return

if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

bottle = (A ** 2) * B
x = -1
y = -1
import math
area = X / A
if X < bottle / 2:
  y = (X * 2 / B) / A
  x = B
  print(90 - math.degrees(math.atan(y/x)))
else:
  print("kocchi")
  x = (bottle - X) * 2 / (A ** 2)
  y = A
  print(x,y)
  if x == 0:
    print(0)
  else:
    print(90 - math.degrees(math.atan(y/x)))

Submission status: Wrong Answer

Solution code:
from math import atan, sqrt, degrees

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

ans = 0

if x <= a*a*b/2:
    ans = degrees(atan(b*sqrt(b/(2*x))))
else:
    ans = degrees(atan((2*b-2*x/(a*a))/a))

print(ans)

Submission status: Wrong Answer

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)
from math import atan,tan,pi

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

a,b,x = LI()

# 半分以上
if x**2 >= a*b/2:
    angle = math.degrees(math.atan(2*(b/a-x/a**3)))
# 半分以下
else:
    angle = math.degrees(math.atan(a*b**2/(2*x)))

print(angle)

Submission status: Wrong Answer

Solution code:
import math
inp = list(map(int,input().split()))
a=inp[0]
b=inp[1]
x=inp[2]
k=(2*(a*a*b-x))/(a**3)
z=math.atan(k)
z=(180/math.pi)*z
print (z)

Submission status: Wrong Answer

Solution code:
import math
inp = list(map(int,input().split()))
a=inp[0]
b=inp[1]
x=inp[2]
k=(2*(a*a*b-x))/(a**3)
print (math.atan(k))

Submission status: Wrong Answer

Solution code:
import math
a, b, x = map(int, input().split())
# 限界まで傾けた時、a**2 * b - 0.5 * a**2 * tanθ * a = x
tan = 2 * (a**2 * b - x) / a**3
# print(tan)
ans = math.degrees(math.atan(tan))
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a, b, x = list(map(float, input().split()))
if x <= 0.5 * a * a * b:
    res = math.atan(2 * x / (a * b * b))
elif x < a * a * b:
    res = math.atan(a / (2 * (b - x / a ** 2)))
else:
    res = 0.0
print(f'{90 - res * 180 / math.pi:.7f}')

Submission status: Wrong Answer

Solution code:
import math

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

if x > v/2:
    y = 2*(b-(x/(a*a)))
    naname = math.sqrt((y*y) + (a*a))
    cosine = a/naname
    print(math.degrees(math.acos(cosine)))
elif x < v/2:
    y = 2*x/(b*a)
    naname = math.sqrt((y*y)+(b*b))
    cosine = b / naname
    print(90-math.degrees(math.acos(cosine)))
else:
    print(3)
    naname = math.sqrt((a*a)+(b*b))
    cosine = a/naname
    print(math.degrees(math.acos(cosine)))

Submission status: Wrong Answer

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

t = False
volume = a*a*b
if x <= volume/2:
  t = True
  
if t:
  tan = b*(math.sqrt(b/(2*x)))
else:
  tan = 2*((a**2)*b - x)/a**3
    
print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

    s = x/a

    s_delta = a*b - s
    print(math.degrees(math.atan((2* s_delta)/a**2)))

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
from math import atan
from math import degrees

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

volume = a * a * b
volume_per = x / volume

print(volume_per)

if volume_per >= 0.5:
    up = b * (1 - volume_per)
    down = a / 2
else:
    up = b
    down = 2 * a * volume_per

print(degrees(atan(up/down)))

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int,input().split())
lb = 0
ub = 90

while ub - lb > 0.5 * 10**-6:
    theta = (lb+ub) / 2
    ts = math.sin(math.radians(theta))
    tc = math.cos(math.radians(theta))
    tt = math.tan(math.radians(theta))
    
    if b * math.tan(math.radians(90 - theta)) > a:
        y = a*a*ts*(a*ts*tt + a*tc)/2
        yy = a*a*b-x
        if y - yy >= 0:
            ub = theta
        else:
            lb = theta
    else:
        y = b * b * math.tan(math.radians(90 - theta)) * a
        if y - x < 0:
            ub = theta
        else:
            lb = theta
print(theta)

Submission status: Wrong Answer

Solution code:
import math

a, b, x = 12, 21, 10
lb = 0
ub = 90

while ub - lb > 0.5 * 10**-6:
    theta = (lb+ub) / 2
    ts = math.sin(math.radians(theta))
    tc = math.cos(math.radians(theta))
    tt = math.tan(math.radians(theta))
    
    if b * math.tan(math.radians(90 - theta)) > a:
        y = a*a*ts*(a*ts*tt + a*tc)/2
        yy = a*a*b-x
        if y - yy >= 0:
            ub = theta
        else:
            lb = theta
    else:
        y = b * b * math.tan(math.radians(90 - theta)) * a
        if y - x < 0:
            ub = theta
        else:
            lb = theta
print(theta)

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int,input().split())
lb = 0
ub = 90

while ub - lb > 0.5 * 10**-6:
    theta = (lb+ub) / 2
    ts = math.sin(math.radians(theta))
    tc = math.cos(math.radians(theta))
    tt = math.tan(math.radians(theta))
    
    if b * math.tan(math.radians(90 - theta)) > a:
        y = a*a*ts*(a*ts*tt + a*tc)/2
        yy = a*a*b-x
        if y - yy >= 0:
            ub = theta
        else:
            lb = theta
    else:
        y = b * math.tan(math.radians(90 - theta)) * a
        if y - x < 0:
            ub = theta
        else:
            lb = theta
print(theta)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
import math
from sys import stdin
input = stdin.readline


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

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


if(__name__ == '__main__'):
  main()

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
from collections import deque
from collections import OrderedDict
import itertools
import math
from sys import stdin
input = stdin.readline


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

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


if(__name__ == '__main__'):
  main()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math
a,b,x = (int(i) for i in input().rstrip('\n').split())
if b*(a**2)<x:
  S=2*(b*(a**2)-x)
  res = math.atan2(S,a**3)
  res2 = math.degrees(res)
  print(res2)
else:
  res = math.atan2(2*x,a*(b**2))
  res2 = math.degrees(res)
  print(90-res2)

Submission status: Wrong Answer

Solution code:
import math

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

x = x / a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
from math import atan, pi

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

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

Submission status: Wrong Answer

Solution code:
import math

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

check = math.degrees(math.atan(b/a))

yoyu = a*a*b - x

tan1 = 2*yoyu / a**3
ans1 = math.degrees(math.atan(tan1))

tan2 = a*b**2 / 2*x
ans2 = math.degrees(math.atan(tan2))

if check >= ans1:
    print(ans1)
else:
    print(ans2)

Submission status: Wrong Answer

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

from math import pi, tan, radians
# import math
l = 0
r = 180

for i in range(200000):
    m = (l+r)/2
    # print(m)
    if b * tan(radians(180.0/2-m)) <= a:
        d = b * tan(radians(180.0/2-m)) * b * a / 2
    else:
        d = b*a*a - tan(radians(m))*a*a/2
        # d = b - tan(m) / 2
    
    if d == x:
        print(m)
        exit(0)
    elif d > x:
        l = m
    else:
        r = m

print(m)

Submission status: Wrong Answer

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

from math import pi, tan, radians
# import math
l = 0
r = 180

for i in range(100000):
    m = (l+r)/2
    # print(m)
    if b * tan(radians(180.0/2-m)) <= a:
        d = b * tan(radians(180.0/2-m)) * b * a / 2
    else:
        d = b*a*a - tan(radians(m))*a*a/2
        # d = b - tan(m) / 2
    
    if d == x:
        print(m)
        exit(0)
    elif d > x:
        l = m
    else:
        r = m

print(m)

Submission status: Wrong Answer

Solution code:
import sys
#import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
a,b,x = rl()
if x<=a*a*b/2:

    print(180*math.atan(math.sqrt(b**3/2/x))/math.pi)
else:
    t = 2*(a*a*b-x)/a/a
    print(180/math.pi*math.atan(t/a))

Submission status: Wrong Answer

Solution code:
import sys
#import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
import bisect
#import heapq
import math
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
a,b,x = rl()
if x<=a*a*b/2:
    t = math.sqrt((2*x/b))

    print(180/math.pi*math.atan(b/t))
else:
    t = 2*(a*a*b-x)/a/a
    print(180/math.pi*math.atan(t/a))

Submission status: Wrong Answer

Solution code:
import math
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def S(): return input()
def LS(): return input().split()


a, b, x = LI()
x_h = x / a ** 2
if x_h <= b / 2:
    s = x / a
    c = 2 * s / b
    print(c)
    shahen = math.sqrt(b ** 2 + c ** 2)
    deg = math.degrees(math.acos(c / shahen))
else:
    s = (x - b / 2) / a
    c = 2 * s / a
    shahen = math.sqrt(a ** 2 + c ** 2)
    deg = math.degrees(math.acos(c / shahen))
print(deg)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import atan,pi
a,b,x=map(int,input().split())
#台形
h=x/(a**2)
c=(b-h)*2
theta=atan(c/a)/2/pi*360
print(theta)

Submission status: Wrong Answer

Solution code:
import math

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

if 2 *x <= a *b **2:
    p1 = a * b ** 2
    p2 = 2 * x
else:
    p1 = 2 * (a ** 2 * b - x)
    p2 = a ** 3

sit = math.atan(p1 / p2)
print(math.degrees(sit))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if (a*a*b/2<=x):
  if (a*a*b==x):
    print(0)
  else:
    theta=math.atan((a*a*a)/(2*(a*a*b-x)))
    print(90.0-theta*180.0/math.pi)
else:
  theta=math.atan(x/(a*b*b))
  print(90-theta*180.0/math.pi)

Submission status: Wrong Answer

Solution code:
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, x = map(int, readline().split())
    if a*a*b/2 < x:
        tan = 2 * b / a - 2 * x / (a ** 3)
        ans = math.degrees(math.atan(tan))
        print(ans)
    else:
        tan = a * b * b /x
        ans = math.degrees(math.atan(tan))
        print(ans)
        
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
import sys
import bisect
import itertools
import collections
import fractions
import heapq
import math
from operator import mul
from functools import reduce
from functools import lru_cache


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b, x = map(int, readline().split())

    tan = 2 * b / a - 2 * x / (a ** 3)
    ans = math.degrees(math.atan(tan))
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

tan = (2*((a**2)*b-x))/a**3

if x < (a**3)*tan/2:
    tan = (2*a*(b**2))/x

deg = math.degrees(math.atan(tan))
print(deg)

Submission status: Wrong Answer

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

bottle=(a**2)*b
#空間が三角柱か四角柱の境目の時の角度r
r=a/b
r=math.degrees(math.atan(r))

theta=2*(bottle-x)/(a**3)
theta=math.degrees(math.atan(theta))

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

Submission status: Wrong Answer

Solution code:
import math

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

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

print(theta * 360 / (2 * math.pi))

Submission status: Wrong Answer

Solution code:
import math

a,b,x = (int(a) for a in input().split())
if x <= a**2 * b / 2 :
    t = b
    s = 2 * x / (a*b)
    r = s / t
    print(90 - math.degrees(math.atan(r)))
else : 
    t = a
    s = 2 * b ** 2 - 2 * x / (a ** 2)
    r = s / t
    print(math.degrees(math.atan(r)))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split()) 
aa=max(0,2*a**2*b-2*x)
bb=a**3
print(math.degrees(math.atan2(aa,bb)))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split()) 
aa=min(0,2*a**2*b-2*x)
bb=a**3
print(math.degrees(math.atan2(aa,bb)))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split()) 
aa=2*a**2*b-2*x
bb=a**3
print(math.degrees(math.atan2(aa,bb)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

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

base = a * a * b /2

if int(base) == x:
    print(math.degrees(math.atan(b/a)))
elif base > x:
    ah = 2 * x / (a * b)
    print(math.degrees(math.atan(b/ah)))
else:
    bh = (x - base) / (a * a)
    c = b - bh
    print(math.degrees(math.atan(c/a)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a,b,x=list(map(int,input().split()))
import math
import sys
if a*a*b==x:
  print(90.0000000000)
  sys.exit()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


if x > a*a*b/2:
  ｘ = x /(a*a)*2
  ok = 0
  ng = 90
  while ng-ok > 10**(-7):
    y = (ok + ng) /2
    if x + a*math.tan(math.radians(y))/2 > b:
      ng = y
    else:
      ok = y
  print(ng)
else:
  x = x/a
  ok = 0
  ng = 90
  while ng-ok > 10**(-7):
    y = (ok + ng) /2
    if x*2/b * math.tan(math.radians(y)) > b:
      ng = y
    else:
      ok = y
  print(ng)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, b, x = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    import math
    import bisect
    #台形の場合
    if 2*x / (a**2) >= b:
        Down = [(x/(a**2) + a * math.tan(math.pi * i /(2* 9*10**7)) /2) for i in range(9*10**7)]
        ind = bisect.bisect_left(Down, b)

    # 三角形の場合
    else:
        Down = [math.sqrt(2*x /a * math.tan(math.pi * i /(2* 9*10**7))) for i in range(9*10**7)]
        ind = bisect.bisect_left(Down, b)

    print(float(ind/10**6))
# resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, b, x = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    import math
    import bisect
    #台形の場合
    if 2*x / (a**2) >= b:
        Down = [(x/(a**2) + a * math.tan(math.pi * i /(2* 9*10**6)) /2) for i in range(9*10**6)]
        ind = bisect.bisect_left(Down, b)

    # 三角形の場合
    else:
        Down = [math.sqrt(2*x /a * math.tan(math.pi * i /(2* 9*10**6))) for i in range(9*10**6)]
        ind = bisect.bisect_left(Down, b)

    print(float(ind/10**5))
resolve()