Buggy python submission (verdict: Runtime Error):
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
else:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)


Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
from decimal import *
A, B, H, M = map(int,input().split())
if H == 0:
    H = 12
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M = map(int,input().split())
n = 10
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
y = math.floor(x * 10 ** n) / (10 ** n)
print(math.sqrt(y))


Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M = map(int,input().split())
n = 11
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
y = math.floor(x * 10 ** n) / (10 ** n)
print(math.sqrt(y))

Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M = map(int,input().split())
n = 11
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
y = math.floor(x * 10 ** n) / (10 ** n)
print(math.sqrt(y))

Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M = map(int,input().split())

# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
print(math.sqrt(x))

Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)

Buggy python submission (verdict: Runtime Error):
import math
A, B, H, M = map(int,input().split())

# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
print(long , short)
if long < short:
    theta = short - long
if long > short:
    theta = lomg - short
if theta > 180:
    theta = 360 - theta
print(theta)
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
print(math.sqrt(x))

Fixed submission:
import math
from decimal import *
A, B, H, M = map(int,input().split())
# 長針の角度
long = 6 * M
# 短針の角度
short = 30*(H) + 0.5*M
theta = abs(long - short)
if theta > 180:
    theta = 360 - theta
cos = math.cos(math.radians(theta))
x = A**2 + B**2 - 2*A*B*cos
x = math.sqrt(x) # 平方根に変換
n = 10 # 小数点10位以下を切り捨て
y = Decimal(str(x)).quantize(Decimal(str(10**(n*-1))), rounding=ROUND_DOWN)
print(y)