Buggy python submission (verdict: Runtime Error):
import math
[a,b,h,m] = [int(x) for x in input().split(" ")]
short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = (abs(long-short)
inte = math.cos(math.radians(theta ))
print(math.sqrt(a**2+b**2+a*b*abs(inte)))


Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
import math
[a,b,h,m] = [int(x) for x in input().split(" ")]
short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(360-abs(short-long)))

print( math.sqrt(a*2+b*2+a*b*math.cos(math.radians(theta))))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
import math

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

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(360-abs(short-long)))

print( math.sqrt (a*2+b*2+a*b*math.cos(math.radians(theta))))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
import math

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

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(360-abs(short-long)))

print( math.sqrt (a*2+b*2+a*b*math.cos(theta)))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
import math

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

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(360-abs(short-long)))

print(math.sqrt(a*2+b*2+a*b*math.cos(theta)))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):

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

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(short-long))

print(a*2+b*2+a*b*cos(theta))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
[a,b,h,m] = input().split(" ")

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(short-long))

print(a*2+b*2+a*b*cos(theta))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))

Buggy python submission (verdict: Runtime Error):
[a,b,h,m] = input().split(" ")

short = (h*60+m)/(12*60)*360
long = (m)/(60)*360
theta = min(abs(long-short),abs(short-long))

print(4*2+3*2+12*cos(theta))

Fixed submission:
import math
 
[a, b, h, m] = [int(x) for x in input().split(" ")]
short = ((h) * 60 + m) / (12 * 60) * 360
long = (m) / (60) * 360
theta = abs(long - short)
inte = math.cos(math.radians(theta))
print(math.sqrt(a ** 2 + b ** 2- 2*a * b * inte))