problem_id stringlengths 6 6 | buggy_code stringlengths 8 526k | fixed_code stringlengths 12 526k | labels listlengths 0 15 ⌀ | buggy_submission_id int64 1 1.54M | fixed_submission_id int64 2 1.54M | user_id stringlengths 10 10 | language stringclasses 8
values |
|---|---|---|---|---|---|---|---|
p02677 | a,b,h,m=map(int,input().split())
import math
pi=math.pi
s1=30*h+m/2
s2=6*m
s1s2=abs(abs(s2-s1)-180)
cos=math.cos(math.radians(s1s2))
print((a**2+b**2-2*a*b*cos)**0.5) | a,b,h,m=map(int,input().split())
import math
pi=math.pi
s1=30*h+m/2
s2=6*m
s1s2=abs(s2-s1)
cos=math.cos(math.radians(s1s2))
print((a**2+b**2-2*a*b*cos)**0.5) | [
"call.remove",
"call.arguments.change"
] | 399,201 | 399,202 | u332793228 | python |
p02677 | import math
all = input()
A = int(all.split(' ')[0])
B = int(all.split(' ')[1])
H = int(all.split(' ')[2])
M = int(all.split(' ')[3])
delta_ = H/12+(1/12)*(M/60)-M/60
print(delta_)
c = (A**2+B**2-2*A*B*math.cos(2*delta_*math.pi))**0.5
print(c) | import math
all = input()
A = int(all.split(' ')[0])
B = int(all.split(' ')[1])
H = int(all.split(' ')[2])
M = int(all.split(' ')[3])
delta_ = H/12+(1/12)*(M/60)-M/60
c = (A**2+B**2-2*A*B*math.cos(2*delta_*math.pi))**0.5
print(c) | [
"call.remove"
] | 399,203 | 399,204 | u828551622 | python |
p02677 | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | #!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return... | [
"assignment.add"
] | 399,213 | 399,214 | u423585790 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
time = H*60+M
h_a = int((time/720)*360%360)
m_a = M*6
arg = abs(h_a - m_a)
print(math.sqrt(float(A)**2 + float(B)**2 - 2*A*B*math.cos(math.radians(arg)))) | import math
A, B, H, M = map(int, input().split())
time = H*60+M
h_a = (time/720)*360
m_a = M*6
arg = abs(h_a - m_a)
print(math.sqrt(float(A)**2 + float(B)**2 - 2*A*B*math.cos(math.radians(arg)))) | [
"call.remove",
"call.arguments.change"
] | 399,219 | 399,220 | u209426189 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
while (theta > 180.):
theta -= 180.
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(theta)
... | import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
if (theta >= 180.):
theta = 360 - theta
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(the... | [
"control_flow.branch.while.replace.add",
"control_flow.loop.if.replace.remove",
"expression.operator.compare.change",
"control_flow.loop.condition.change"
] | 399,225 | 399,224 | u981884699 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
if (theta > 180.):
theta -= 180.
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(theta)
x ... | import math
a, b, h, m = map(int, input().split())
def choshin_angle(m):
return 6 * m
def tanshin_angle(h, m):
return 0.5 * (60 * h + m)
theta = abs(tanshin_angle(h, m) - choshin_angle(m))
if (theta >= 180.):
theta = 360 - theta
theta = math.radians(theta)
x2 = a**2 + b**2 - 2 * a * b * math.cos(the... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 399,226 | 399,224 | u981884699 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
theta = abs(H/6 - M/30) * math.pi
x = math.sqrt((A * math.sin(theta))**2 + (B - A * math.cos(theta))**2)
print(x)
| import math
A, B, H, M = map(int, input().split())
H += M/60
theta = abs(H/6 - M/30) * math.pi
x = math.sqrt((A * math.sin(theta))**2 + (B - A * math.cos(theta))**2)
print(x)
| [] | 399,229 | 399,230 | u842747358 | python |
p02677 | import math
def resolve():
a,b,h,m = map(int, input().split())
a_deg = h*30 + m*0.5
b_deg = m*6
angle = abs(a_deg - b_deg)
if angle == 0 or angle == 360:
print(abs(b-a))
elif angle == 180:
print(a+b)
elif angle > 180:
angle = 360 - angle
rad = math.radians(angle)... | import math
def resolve():
a,b,h,m = map(int, input().split())
a_deg = h*30 + m*0.5
b_deg = m*6
angle = abs(a_deg - b_deg)
if angle == 0 or angle == 360:
print(abs(b-a))
return
elif angle == 180:
print(a+b)
return
elif angle > 180:
angle = 360 - angl... | [
"control_flow.return.add"
] | 399,231 | 399,232 | u752395175 | python |
p02677 | import math
a,b,h,m = map(int, input().split())
h_angle=30*h
m_angle=6*m
sa_angle=abs(h_angle - m_angle)
if(sa_angle > 180 ):
sa_angle=360- sa_angle
theta=(sa_angle / 180) * math.pi
c_2=a*a +b*b -2*a*b*math.cos(theta)
c=math.sqrt(c_2)
print(c) | import math
a,b,h,m = map(int, input().split())
h_angle=30*h+0.5*m
m_angle=6*m
sa_angle=abs(h_angle - m_angle)
if(sa_angle > 180 ):
sa_angle=360- sa_angle
theta=(sa_angle / 180) * math.pi
c_2=a*a +b*b -2*a*b*math.cos(theta)
c=math.sqrt(c_2)
print(c) | [
"assignment.change"
] | 399,233 | 399,234 | u760446276 | python |
p02677 | # -*- coding: utf-8 -*-
"""
Created on Sun May 17 21:16:04 2020
@author: Kei
"""
import math
A,B,H,M = map(int,input().split())
theta_s = H*30
theta_l = M*6
theta = abs(theta_s-theta_l)
if theta > 180:
theta = 360 - theta
#print(theta)
C = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(theta)))
print... | # -*- coding: utf-8 -*-
"""
Created on Sun May 17 21:16:04 2020
@author: Kei
"""
import math
A,B,H,M = map(int,input().split())
theta_s = H*30 + M*0.5
theta_l = M*6
theta = abs(theta_s-theta_l)
if theta > 180:
theta = 360 - theta
#print(theta)
C = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(theta))... | [
"assignment.change"
] | 399,239 | 399,240 | u960165318 | python |
p02677 | import math as m
A,B,H,M=map(int,input().split())
a=(30*H)+(M/2)
b=M*1
if b-a==180 or a-b==180:
print(A+B)
else:
if b-a>=0:
if b-a<180:
c=b-a
d=m.radians(c)
f=m.cos(d)
e=A*A+B*B-2*A*B*f
g=m.sqrt(e)
print(g)
else:
... | import math as m
A,B,H,M=map(int,input().split())
a=(30*H)+(M/2)
b=M*6
if b-a==180 or a-b==180:
print(A+B)
else:
if b-a>=0:
if b-a<180:
c=b-a
d=m.radians(c)
f=m.cos(d)
e=A*A+B*B-2*A*B*f
g=m.sqrt(e)
print(g)
else:
... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,247 | 399,248 | u726154863 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
if(h==0 and m==0):
print(0)
else:
ah=(h*30)+(m*0.5)
am=m*6
an=abs(ah-am)
f=abs(360-an)
ang=min(an,f)
d=math.cos(math.radians(ang))
z=math.sqrt((a**2)+(b**2)-(2*b*a*d))
print(z) | import math
a,b,h,m=map(int,input().split())
if(h==0 and m==0):
print(abs(a-b))
else:
ah=(h*30)+(m*0.5)
am=m*6
an=abs(ah-am)
f=abs(360-an)
ang=min(an,f)
d=math.cos(math.radians(ang))
z=math.sqrt((a**2)+(b**2)-(2*b*a*d))
print(z) | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 399,249 | 399,250 | u776134564 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
h=h*30+(m/60)*30
m=m*6
diff=abs(h-m)*((math.pi)/180)
if(diff>180):
diff=diff-180
ans=a*a+b*b-2*a*b*abs(math.cos(diff))
print(math.sqrt(ans))
| import math
a,b,h,m=map(int,input().split())
h=h*30+(m/60)*30
m=m*6
diff=abs(h-m)*((math.pi)/180)
if(diff>180):
diff=diff-180
ans=a*a+b*b-2*a*b*(math.cos(diff))
print(math.sqrt(ans))
| [] | 399,251 | 399,252 | u973840289 | python |
p02677 | import math
a,b,h,m = map(int,input().split())
h_x = a*math.cos(math.radians(90-(h*60+m)/2))
h_y = a*math.sin(math.radians(90-(h*60+m)/2))
t_x = b*math.cos(math.radians(90-(m*60)))
t_y = b*math.sin(math.radians(90-(m*60)))
#print(90-(m*60),t_x,t_y)
print((abs(h_x-t_x)**2+abs(h_y-t_y)**2)**0.5) | import math
a,b,h,m = map(int,input().split())
h_x = a*math.cos(math.radians(90-(h*60+m)/2))
h_y = a*math.sin(math.radians(90-(h*60+m)/2))
t_x = b*math.cos(math.radians(90-(m*6)))
t_y = b*math.sin(math.radians(90-(m*6)))
#print(90-(m*60),t_x,t_y)
print((abs(h_x-t_x)**2+abs(h_y-t_y)**2)**0.5) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,253 | 399,254 | u228223940 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
cosAB = abs((H * 30) - (M * 6))
C = math.sqrt(pow(A, 2) + pow(B, 2) - 2*A*B*math.cos(math.radians(cosAB)))
print (C) | import math
A, B, H, M = map(int, input().split())
cosAB = abs((H * 30 + M * 0.5) - (M * 6))
C = math.sqrt(pow(A, 2) + pow(B, 2) - 2*A*B*math.cos(math.radians(cosAB)))
print (C) | [
"assignment.change"
] | 399,258 | 399,259 | u582396808 | python |
p02677 | from math import *;
a, b, h, m = list(map(int, input().split()))
angle = 2 * pi * abs((h + m / 60) / 12 - m / 60)
if angle >= pi:
angle = 2 * pi - angle
ans = a * a + b * b - 2 * a * b * abs(cos(angle))
print(sqrt(abs(ans))) | from math import *;
a, b, h, m = list(map(int, input().split()))
angle = 2 * pi * abs((h + m / 60) / 12 - m / 60)
if angle >= pi:
angle = 2 * pi - angle
ans = a * a + b * b - 2 * a * b * cos(angle)
print(sqrt(abs(ans))) | [
"call.remove",
"call.arguments.change"
] | 399,264 | 399,265 | u909815117 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
a_h = h*30 + m*0.5
a_m = m* 6
angle = abs(a_h-a_m)%180
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(angle)))) | import math
a, b, h, m = map(int, input().split())
a_h = h*30 + m*0.5
a_m = m* 6
angle = abs(a_h-a_m)
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(angle))))
| [
"expression.operation.binary.remove"
] | 399,269 | 399,270 | u167647458 | python |
p02677 | a,b,h,m = map(int, input().split(' '))
import math
if h == 0:
hang = 360
else:
hang = 1/12*h*360 + 1/60*m*30
if m == 0:
mang = 360
else:
mang = 1/60*m*360
ang = min(abs(hang-mang), abs(mang-hang))
c2 = a**2 + b**2 -2*a*b*math.cos(ang*math.pi/180)
print(math.sqrt(c2)) | a,b,h,m = map(int, input().split(' '))
import math
if h == 0 and m == 0:
hang = 360
else:
hang = 1/12*h*360 + 1/60*m*30
if m == 0:
mang = 360
else:
mang = 1/60*m*360
ang = min(abs(hang-mang), abs(mang-hang))
c2 = a**2 + b**2 -2*a*b*math.cos(ang*math.pi/180)
print(math.sqrt(c2)) | [
"control_flow.branch.if.condition.change"
] | 399,274 | 399,275 | u474484450 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
a_angle = 30 * (H + M / 60)
b_angle = 6 * M
if a_angle == 0:
a_angle = 360
if b_angle == 0:
b_angle = 360
if abs(a_angle - b_angle) < abs(b_angle - a_angle):
angle = abs(a_angle - b_angle)
else:
angle = abs(b_angle - a_angle)
#print(math.cos(math.... | import math
A, B, H, M = map(int, input().split())
a_angle = 30 * (H + M / 60)
b_angle = 6 * M
if a_angle == 0:
a_angle = 360
if b_angle == 0:
b_angle = 360
if abs(a_angle - b_angle) < abs(b_angle - a_angle):
angle = abs(a_angle - b_angle)
else:
angle = abs(b_angle - a_angle)
# print(math.cos(math... | [
"assignment.change"
] | 399,292 | 399,293 | u853064660 | python |
p02677 | # coding:utf-8
import math
def h_degree(h, m):
return (h*60 + m) * 0.5
def m_degree(m):
return m * 6
A, B, H, M = map(int, input().split(' '))
d = abs(h_degree(H, M) - m_degree(M))
if d == float(0):
print(B - A)
elif d == float(180):
print(A + B)
else:
if d > 180:
d = 360 - d
C2... | # coding:utf-8
import math
def h_degree(h, m):
return (h*60 + m) * 0.5
def m_degree(m):
return m * 6
A, B, H, M = map(int, input().split(' '))
d = abs(h_degree(H, M) - m_degree(M))
if d == float(0):
print(abs(A - B))
elif d == float(180):
print(A + B)
else:
if d > 180:
d = 360 - d
... | [
"call.arguments.add"
] | 399,296 | 399,297 | u292849987 | python |
p02677 | A,B,H,M=map(int,input().split())
N=abs(H*30+M*0.5-M*6)
if N >= 180 :
N=360-N
import math
ans2=A**2+B**2-2*A*B*math.cos((math.radians(N)))
#print(A**2,B**2,2*A*B,math.cos(math.radians(N)))
ans=math.sqrt(ans2) | A,B,H,M=map(int,input().split())
N=abs(H*30+M*0.5-M*6)
if N >= 180 :
N=360-N
import math
ans2=A**2+B**2-2*A*B*math.cos((math.radians(N)))
#print(A**2,B**2,2*A*B,math.cos(math.radians(N)))
ans=math.sqrt(ans2)
print(ans) | [
"call.add"
] | 399,314 | 399,315 | u922769680 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
alpha = abs(H + M / 60 - M / 5)
if 6 < alpha:
alpha -= 6
print(math.sqrt(A ** 2 + B ** 2 - (math.cos(alpha * math.pi / 6) * 2 * A * B))) | import math
A, B, H, M = map(int, input().split())
alpha = abs(H + M / 60 - M / 5)
if 6 < alpha:
alpha = 12 - alpha
print(math.sqrt(A ** 2 + B ** 2 - (math.cos(alpha * math.pi / 6) * 2 * A * B))) | [
"assignment.add"
] | 399,322 | 399,323 | u382251756 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
H_an = H * 360 /12
M_an = M * 360 /60
an = abs(H_an - M_an)
if an >= 180:
an = 360 - an
an = an * math.pi/180
a = (A**2) + (B**2) - (2*A*B*math.cos(an))
print(math.sqrt(a)) | import math
A, B, H, M = map(int, input().split())
H_an = H * 360 /12 + M / 2
M_an = M * 360 /60
an = abs(H_an - M_an)
if an >= 180:
an = 360 - an
an = an * math.pi/180
a = (A**2) + (B**2) - (2*A*B*math.cos(an))
print(math.sqrt(a)) | [
"assignment.change"
] | 399,332 | 399,333 | u750485713 | python |
p02677 | import numpy as np
A,B,H,M = (int(x) for x in input().split())
argA = 30*H + 0.5*M
argB = 6*M
if argA>argB:
arg = argA-argB
else:
arg = argB-argA
if arg > 180:
arg -= 180
cc = A**2 + B**2 -2*A*B*np.cos((arg/180)*np.pi)
c = np.sqrt(cc)
print(c) | import numpy as np
A,B,H,M = (int(x) for x in input().split())
argA = 30*H + 0.5*M
argB = 6*M
if argA>argB:
arg = argA-argB
else:
arg = argB-argA
if arg > 180:
arg = 360 - arg
cc = A**2 + B**2 -2*A*B*np.cos((arg/180)*np.pi)
c = np.sqrt(cc)
print(c) | [
"assignment.add"
] | 399,337 | 399,338 | u009447431 | python |
p02677 | import sys
import math
A, B, H, M = map(int, input().split())
mnt = 60 * H + M
arg_A = (mnt % 720) * 0.5
arg_B = (mnt % 60) * 6
#print(arg_A, arg_B)
if arg_A == arg_B:
print(B-A)
sys.exit()
elif abs(arg_A-arg_B) == 180:
print(A+B)
sys.exit()
big = max(arg_A, arg_B)
small = min(arg_A, arg_B)
w = big - small... | import sys
import math
A, B, H, M = map(int, input().split())
mnt = 60 * H + M
arg_A = (mnt % 720) * 0.5
arg_B = (mnt % 60) * 6
#print(arg_A, arg_B)
if arg_A == arg_B:
print(abs(B-A))
sys.exit()
elif abs(arg_A-arg_B) == 180:
print(A+B)
sys.exit()
big = max(arg_A, arg_B)
small = min(arg_A, arg_B)
w = big - ... | [
"call.arguments.add",
"call.arguments.change"
] | 399,347 | 399,348 | u886297662 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
theta_A = math.pi / 6 * H
theta_B = math.pi / 30 * M
theta = abs(theta_A - theta_B)
if theta > math.pi:
theta = 2 * math.pi - theta
L = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
print(L) | import math
A, B, H, M = map(int, input().split())
theta_A = math.pi / 6 * (H + M / 60)
theta_B = math.pi / 30 * M
theta = abs(theta_A - theta_B)
if theta > math.pi:
theta = 2 * math.pi - theta
L = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(theta))
print(L) | [] | 399,349 | 399,350 | u837340160 | python |
p02677 | import math
import sys
def calc_clock_angle(h, m):
m_angle = (360 / 60) * m
h_angle = (360 / 12) * h + ((360 / 12) / 60 ) * m
angle = abs(m_angle - h_angle)
if angle > 180:
return angle - 180
else:
return angle
pass
a, b, h, m = map(int, input().split())
if h == 12 and m == 0:
... | import math
import sys
def calc_clock_angle(h, m):
m_angle = (360 / 60) * m
h_angle = (360 / 12) * h + ((360 / 12) / 60 ) * m
angle = abs(m_angle - h_angle)
if angle > 180:
return 360 - angle
else:
return angle
pass
a, b, h, m = map(int, input().split())
if h == 12 and m == 0:
... | [
"expression.operation.binary.remove"
] | 399,361 | 399,362 | u155757809 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
t_a = 0.5*(h*60+m)
t_b = 6*m
t = (t_a - t_b)
if t > 180:
t -= 180
c = math.cos(t*2*math.pi/360.0)
print(math.sqrt(a ** 2 + b ** 2 - 2 * a * b * c), end="")
| import math
a, b, h, m = map(int, input().split())
t_a = 0.5*(h*60+m)
t_b = 6*m
t = (t_a - t_b)
if t > 180:
t = 360 - t
c = math.cos(t*2*math.pi/360.0)
print(math.sqrt(a ** 2 + b ** 2 - 2 * a * b * c), end="")
| [
"assignment.add"
] | 399,369 | 399,370 | u270343876 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
# 分針の角度
perm = (m / 60) * 360
# 時針の角度
rh = (h / 12) * 360 + (m / 60) * 12 / 360
# print((perm) * 12 / 360)
# print(rh, perm)
deg = min(abs(perm - rh), 360 - abs(perm - rh))
# print(deg)
rdeg = math.pi / 180 * deg
# print(rdeg)
ans = math.sqrt(a * a + b * b - 2 * a ... | import math
a, b, h, m = map(int, input().split())
# 分針の角度
perm = (m / 60) * 360
# 時針の角度
rh = (h / 12) * 360 + (m / 60) * 360 / 12
# print(rh, perm)
deg = min(abs(perm - rh), 360 - abs(perm - rh))
# print(deg)
rdeg = math.pi / 180 * deg
# print(rdeg)
ans = math.sqrt(a * a + b * b - 2 * a * b * math.cos(rdeg))
pri... | [
"expression.operation.binary.remove"
] | 399,382 | 399,383 | u506910932 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
m = M * 60
h = H * 30 + M / 2
ms = B * math.sin(math.radians(m))
mc = B * math.cos(math.radians(m))
hs = A * math.sin(math.radians(h))
hc = A * math.cos(math.radians(h))
ans = ((ms - hs) ** 2 + (mc - hc) ** 2) ** 0.5
print(ans) | import math
A, B, H, M = map(int, input().split())
m = M * 6
h = H * 30 + M / 2
ms = B * math.sin(math.radians(m))
mc = B * math.cos(math.radians(m))
hs = A * math.sin(math.radians(h))
hc = A * math.cos(math.radians(h))
ans = ((ms - hs) ** 2 + (mc - hc) ** 2) ** 0.5
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,386 | 399,387 | u513434790 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
print(th)
if th == 0:
print('{:.20f}'.format(abs(a - b)))
exit()
elif th == 180:
print('{:.20f}'.format(a + b))
exit()
if th >= 180:
th = 360 - th
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2... | import math
a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
print('{:.20f}'.format(abs(a - b)))
exit()
elif th == 180:
print('{:.20f}'.format(a + b))
exit()
if th >= 180:
th = 360 - th
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b *... | [
"call.remove"
] | 399,395 | 399,396 | u026862065 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
print('{:.20f}'.format(abs(a - b)))
exit()
elif th == 180:
print('{:.20f}'.format(a + b))
exit()
if th >= 180:
th -= 180
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b * cos... | import math
a, b, h, m = map(int, input().split())
l = m * 6
s = m * 0.5 + h * 30
th = abs(l - s)
if th == 0:
print('{:.20f}'.format(abs(a - b)))
exit()
elif th == 180:
print('{:.20f}'.format(a + b))
exit()
if th >= 180:
th = 360 - th
cos = math.cos(math.radians(th))
ans = a**2 + b**2 - 2 * a * b *... | [
"assignment.add"
] | 399,397 | 399,396 | u026862065 | python |
p02677 | #C
import math
a, b, h, m = map(int, input().split())
def yo(a, b, c):
#辺a,b 角c
# print(pow(a, 2), pow(b, 2), 2 * a * b * math.cos(c))
tmp = pow(a, 2) + pow(b, 2) - 2 * a * b * math.cos(c)
return pow(tmp, 0.5)
ss = (h / 12 + m / 120) * 2 * math.pi
ls = m / 60 * 2 * math.pi
# print(ss, ls, min(abs(ls - ... | #C
import math
a, b, h, m = map(int, input().split())
def yo(a, b, c):
#辺a,b 角c
# print(pow(a, 2), pow(b, 2), 2 * a * b * math.cos(c))
tmp = pow(a, 2) + pow(b, 2) - 2 * a * b * math.cos(c)
return pow(tmp, 0.5)
ss = (h / 12 + m / 720) * 2 * math.pi
ls = m / 60 * 2 * math.pi
# print(ss, ls, min(abs(ls - ... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,398 | 399,399 | u490489966 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
p1 = 30 * h + m // 2
p2 = 6 * m
s = min(abs(p1 - p2), abs(abs(p1 - p2) - 360))
ans = pow(a * math.sin(math.radians(s)), 2) + pow((b - a * math.cos(math.radians(s))), 2)
print((ans) ** (1 / 2)) | import math
a, b, h, m = map(int, input().split())
p1 = 30 * h + m / 2
p2 = 6 * m
s = min(abs(p1 - p2), abs(abs(p1 - p2) - 360))
ans = pow(a * math.sin(math.radians(s)), 2) + pow((b - a * math.cos(math.radians(s))), 2)
print((ans) ** (1 / 2)) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,402 | 399,403 | u644972721 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
p1 = 30 * h + m // 2
p2 = 60 * m
s = min(abs(p1 - p2), abs(abs(p1 - p2) - 360))
ans = pow(a * math.sin(math.radians(s)), 2) + pow((b - a * math.cos(math.radians(s))), 2)
print((ans) ** (1 / 2)) | import math
a, b, h, m = map(int, input().split())
p1 = 30 * h + m / 2
p2 = 6 * m
s = min(abs(p1 - p2), abs(abs(p1 - p2) - 360))
ans = pow(a * math.sin(math.radians(s)), 2) + pow((b - a * math.cos(math.radians(s))), 2)
print((ans) ** (1 / 2)) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.number.integer.change"
] | 399,404 | 399,403 | u644972721 | python |
p02677 | import math
a, b, h, m = map(float, input().split())
mm = (m % 60.0) * 6.0
hh = h * 30.0 + m * 0.5
print(hh, mm)
rad = (mm - hh) * math.pi / 180.0
c = math.sqrt(math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(rad))
print(c)
| import math
a, b, h, m = map(float, input().split())
mm = (m % 60.0) * 6.0
hh = h * 30.0 + m * 0.5
rad = (mm - hh) * math.pi / 180.0
c = math.sqrt(math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(rad))
print(c)
| [
"call.remove"
] | 399,409 | 399,410 | u445624660 | python |
p02677 | import math
li = list(map(int,input().split()))
A=li[0]
B=li[1]
H=li[2]
M=li[3]
long = M/60 * 360
short = H/12 * 360 + M/60 * 30
def f(a,b,angle):
c2 = a*a + b*b -2*a*b*math.cos(math.radians(angle))
return math.sqrt(c2)
angle = 0
ans = 0
if(short==long):
ans = abs(A-B)
elif(abs(short-long) == 180):
... | import math
li = list(map(int,input().split()))
A=li[0]
B=li[1]
H=li[2]
M=li[3]
long = M/60 * 360
short = H/12 * 360 + M/60 * 30
def f(a,b,angle):
c2 = a*a + b*b -2*a*b*math.cos(math.radians(angle))
return math.sqrt(c2)
angle = 0
ans = 0
if(short==long):
ans = abs(A-B)
elif(abs(short-long) == 180):
... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,411 | 399,412 | u034418163 | python |
p02677 | import math
a, b, h, m = map(int,input().split())
ha = 360/12*h+0.5*m
ma = 360/60*m
s = abs(ha-ma)
print(s)
if s >180:
s=360-s
ans = (a**2 + b**2 -2*a*b*math.cos(math.radians(s)))**(1/2)
print(ans)
| import math
a, b, h, m = map(int,input().split())
ha = 360/12*h+0.5*m
ma = 360/60*m
s = abs(ha-ma)
if s >180:
s=360-s
ans = (a**2 + b**2 -2*a*b*math.cos(math.radians(s)))**(1/2)
print(ans) | [
"call.remove"
] | 399,416 | 399,417 | u995163736 | python |
p02677 | import math
a, b, h, m = map(int,input().split())
ha = 360/12*h
ma = 360/60*m
s = abs(ha-ma)
if s >180:
s=360-s
ans = (a**2 + b**2 -2*a*b*math.cos(math.radians(s)))**(1/2)
print(ans) | import math
a, b, h, m = map(int,input().split())
ha = 360/12*h+0.5*m
ma = 360/60*m
s = abs(ha-ma)
if s >180:
s=360-s
ans = (a**2 + b**2 -2*a*b*math.cos(math.radians(s)))**(1/2)
print(ans) | [
"assignment.change"
] | 399,418 | 399,417 | u995163736 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
lk = 6 * m
sk = 30 * h + 0.5 * m
theta = max(lk, sk) - min(lk, sk)
if theta > 180:
theta -= 180
ans = math.sqrt(a*a + b*b - 2 * a * b * math.cos(math.radians(theta)))
print(ans) | import math
a, b, h, m = map(int, input().split())
lk = 6 * m
sk = 30 * h + 0.5 * m
theta = max(lk, sk) - min(lk, sk)
if theta > 180:
theta = 360 - theta
ans = math.sqrt(a*a + b*b - 2 * a * b * math.cos(math.radians(theta)))
print(ans) | [
"assignment.add"
] | 399,421 | 399,422 | u821989875 | python |
p02677 | # -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
theta_a = math.pi * float(h + m / 60) / float(6)
theta_b = math.pi * float(m) / float(30)
theta = theta_a - theta_b
print(theta)
if theta > math.pi or theta < 0:
theta = theta_b - theta_a
square_l = - float(2) * math.cos(theta) * float(a*... | # -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
theta_a = math.pi * float(h + m / 60) / float(6)
theta_b = math.pi * float(m) / float(30)
theta = theta_a - theta_b
if theta > math.pi or theta < 0:
theta = theta_b - theta_a
square_l = - float(2) * math.cos(theta) * float(a*b) + a * a + ... | [
"call.remove"
] | 399,423 | 399,424 | u326245870 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
angle = abs(30*h - 6*m)
dangle = angle if angle <= 180 else 360 - angle
d = math.sqrt(a**2 + b**2 - 2*a*b * math.cos(math.radians(dangle)))
print(d) | import math
a, b, h, m = map(int, input().split())
angle = abs(30*h + 0.5*m - 6*m)
dangle = angle if angle <= 180 else 360 - angle
d = math.sqrt(a**2 + b**2 - 2*a*b * math.cos(math.radians(dangle)))
print(d) | [
"assignment.change"
] | 399,435 | 399,436 | u079427319 | python |
p02677 |
# 標準入力
A,B,H,M=map(int,input().split())
# 角度の差が出る
A_RAD = float((H*60+M)/720*2*math.pi)
B_RAD = float(M/60*2*math.pi)
AB_RAD = A_RAD - B_RAD
C = math.sqrt(A**2+B**2-2*A*B*math.cos(AB_RAD))
print(C) |
import math
# 標準入力
A,B,H,M=map(int,input().split())
# 角度の差が出る
A_RAD = float((H*60+M)/720*2*math.pi)
B_RAD = float(M/60*2*math.pi)
AB_RAD = A_RAD - B_RAD
C = math.sqrt(A**2+B**2-2*A*B*math.cos(AB_RAD))
print(C)
| [] | 399,439 | 399,440 | u135685780 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
a = (H / 6 + M / 360) * math.pi
ax = math.cos(a) * A
ay = math.sin(a) * A
b = M / 30 * math.pi
bx = math.cos(b) * B
by = math.sin(b) * B
print(math.sqrt((ax - bx)**2 + (ax - bx)**2))
| import math
A, B, H, M = map(int, input().split())
a = (H / 6 + M / 360) * math.pi
ax = math.cos(a) * A
ay = math.sin(a) * A
b = M / 30 * math.pi
bx = math.cos(b) * B
by = math.sin(b) * B
print(math.sqrt((ax - bx)**2 + (ay - by)**2))
| [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 399,441 | 399,442 | u440322097 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
a = H*30 + M*0.5
b = M*60
ab = abs(a-b)
ans = A**2 + B**2 - 2*A*B*math.cos(math.radians(ab))
print(ans**0.5) | import math
A,B,H,M = map(int, input().split())
a = H*30 + M*0.5
b = M*6
ab = abs(a-b)
ans = A**2 + B**2 - 2*A*B*math.cos(math.radians(ab))
print(ans**0.5) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,443 | 399,444 | u200527996 | python |
p02677 | a,b,h,m = map(int,input().split())
import math
sitah = 30 * h + 0.5 * m
sitam = 6 * m
sitax = abs(sitah - sitam)
if sitax > 180:
sitax = sitax % 180
kosain = (math.cos((math.radians(sitax))))
x2 = a**2 + b**2 - 2*a*b*kosain
ans = math.sqrt(x2)
print(ans) | a,b,h,m = map(int,input().split())
import math
sitah = 30 * h + 0.5 * m
sitam = 6 * m
sitax = abs(sitah - sitam)
if sitax > 180:
sitax = 360-sitax
kosain = (math.cos((math.radians(sitax))))
x2 = a**2 + b**2 - 2*a*b*kosain
ans = math.sqrt(x2)
print(ans) | [
"expression.operation.binary.remove"
] | 399,447 | 399,448 | u843318346 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
Minute = 60*H+M
pi = math.pi
long=2*pi*Minute/720
short=2*pi*M/60
if -pi<=long-short<=pi:
cos = math.cos(long-short)
else:
cos =math.cos(2*pi - long-short)
ans = (A**2 + B**2 - 2*A*B*cos)**0.5
print(ans) | import math
A,B,H,M = map(int,input().split())
Minute = 60*H+M
pi = math.pi
long=2*pi*Minute/720
short=2*pi*M/60
if -pi<=long-short<=pi:
cos = math.cos(long-short)
else:
cos =math.cos(2*pi - (long-short))
ans = (A**2 + B**2 - 2*A*B*cos)**0.5
print(ans) | [
"call.arguments.change"
] | 399,449 | 399,450 | u648192617 | python |
p02677 | """
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, p... | """
import random
import functools
import copy
import bisect
import array
import re
import collections
import heapq
import itertools
import string
import math
from operator import itemgetter as ig
from bisect import bisect_left, bisect_right, insort_left, insort_right
from itertools import permutations, combinations, p... | [
"call.arguments.change"
] | 399,451 | 399,452 | u840579553 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
h = H * 30 + M / 2
m = M * 6
sita = min(abs(h - m), 360 - abs(h - m))
print(sita)
print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(math.radians(sita))))
| import math
A, B, H, M = map(int, input().split())
h = H * 30 + M / 2
m = M * 6
sita = min(abs(h - m), 360 - abs(h - m))
print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(math.radians(sita))))
| [
"call.remove"
] | 399,455 | 399,456 | u486251525 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
h = H * 30 + M // 2
m = M * 6
sita = min(abs(h - m), 360 - abs(h - m))
print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(math.radians(sita))))
| import math
A, B, H, M = map(int, input().split())
h = H * 30 + M / 2
m = M * 6
sita = min(abs(h - m), 360 - abs(h - m))
print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(math.radians(sita))))
| [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,457 | 399,456 | u486251525 | python |
p02677 | from math import sin, cos, sqrt, radians
A, B, H, M = map(int, input().split())
tan = [0, A]
tyou = [0, B]
tan_angle = H * 30 + 0.5 * M
tyou_angle = M * 6
tan = [A*sin(radians(tan_angle)), A*cos(radians(tan_angle))]
tyou = [B*sin(radians(tyou_angle)), B*cos(radians(tyou_angle))]
print(tan, tyou)
print(sqrt((tan[0]-tyou... | from math import sin, cos, sqrt, radians
A, B, H, M = map(int, input().split())
tan = [0, A]
tyou = [0, B]
tan_angle = H * 30 + 0.5 * M
tyou_angle = M * 6
tan = [A*sin(radians(tan_angle)), A*cos(radians(tan_angle))]
tyou = [B*sin(radians(tyou_angle)), B*cos(radians(tyou_angle))]
print(sqrt((tan[0]-tyou[0])**2 + (tan[1]... | [
"call.remove"
] | 399,466 | 399,467 | u606523772 | python |
p02677 | import sys
import math
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
a,b,h,m = map(int,readline().split())
degree = abs(h*30+30*(m/60) - m*6)
degree = min(degree,180-degree)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(degree)))) | import sys
import math
readline = sys.stdin.buffer.readline
def even(n): return 1 if n%2==0 else 0
a,b,h,m = map(int,readline().split())
degree = abs(h*30+30*(m/60) - m*6)
degree = min(degree,360-degree)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(degree)))) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,468 | 399,469 | u372144784 | python |
p02677 | import math
def main():
A, B, H, M = map(int, input().split())
print(A)
A_angle_from_12 = 30*H + M/2
A_angle = 90 + A_angle_from_12
B_angle_from_12 = 6*M
B_angle = 90 + B_angle_from_12
A_x = A * math.cos(math.radians(A_angle))
A_y = A * math.sin(math.radians(A_angle))
B_x = B * math.cos(math.radia... | import math
def main():
A, B, H, M = map(int, input().split())
A_angle_from_12 = 30*H + M/2
A_angle = 90 + A_angle_from_12
B_angle_from_12 = 6*M
B_angle = 90 + B_angle_from_12
A_x = A * math.cos(math.radians(A_angle))
A_y = A * math.sin(math.radians(A_angle))
B_x = B * math.cos(math.radians(B_angle)... | [
"call.remove"
] | 399,470 | 399,471 | u104935308 | python |
p02677 | A, B, H, M = map(int, input().split())
import math
deg_m_hand = 360*(H/12) + 30*(M/60)
deg_h_hand = 360*(M/60)
theta = deg_m_hand - deg_h_hand
AB = math.sqrt( A**2 + B**2 - 2*A*B*math.cos(theta) )
print(AB) | A, B, H, M = map(int, input().split())
import math
deg_m_hand = 360*(H/12) + 30*(M/60)
deg_h_hand = 360*(M/60)
theta = deg_m_hand - deg_h_hand
AB = math.sqrt( A**2 + B**2 - 2*A*B*math.cos(math.radians(theta) ) )
print(AB) | [
"call.add",
"call.arguments.change"
] | 399,472 | 399,473 | u281334626 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
a=((H+M/60)/12)*2
b=(M/60)*2
if a-b<=1:
omega=a-b
else:
omega=2-(a-b)
print(omega)
print((A**2+B**2-2*A*B*math.cos(omega*math.pi))**(1/2)) | import math
A,B,H,M=map(int,input().split())
a=((H+M/60)/12)*2
b=(M/60)*2
if a-b<=1:
omega=a-b
else:
omega=2-(a-b)
print((A**2+B**2-2*A*B*math.cos(omega*math.pi))**(1/2))
| [
"call.remove"
] | 399,474 | 399,475 | u318165580 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
h = 0.5*(H*60+M)
m = 6*M
t = abs(h-m)
if t > 180:
t = 360 - t
if t <= 90:
p = math.cos(math.radians(t))*B - A
q = math.sin(math.radians(t))*B
print(p,q)
print((p**2+q**2)**0.5)
else:
p = math.cos(math.radians(180-t))*B+A
q = math.sin(math.radi... | import math
A,B,H,M = map(int,input().split())
h = 0.5*(H*60+M)
m = 6*M
t = abs(h-m)
if t > 180:
t = 360 - t
if t <= 90:
p = math.cos(math.radians(t))*B - A
q = math.sin(math.radians(t))*B
print((p**2+q**2)**0.5)
else:
p = math.cos(math.radians(180-t))*B+A
q = math.sin(math.radians(180-t))*B
... | [
"call.remove"
] | 399,478 | 399,479 | u454093752 | python |
p02677 | t = list(map(int, input().split()))
a = t[0]
b = t[1]
h = t[2]
m = t[3]
import math
h_c = 30*h + 0.5*m
m_c = 6*m
z = abs(h_c - m_c)
if z > 180:
z -= 180
if z == 180:
print(t[0]+t[1])
elif z == 0:
print(abs(t[0]-t[1]))
else:
a = a**2
b = b**2
k = round(math.cos(math.radians(z)),30)
print(math.sqrt(a + b ... | t = list(map(int, input().split()))
a = t[0]
b = t[1]
h = t[2]
m = t[3]
import math
h_c = 30*h + 0.5*m
m_c = 6*m
z = abs(h_c - m_c)
if z > 180:
z = 360 - z
if z == 180:
print(t[0]+t[1])
elif z == 0:
print(abs(t[0]-t[1]))
else:
a = a**2
b = b**2
k = round(math.cos(math.radians(z)),30)
print(math.sqrt(a +... | [
"assignment.add"
] | 399,488 | 399,489 | u793666115 | python |
p02677 | import sys
import math
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]
def main():
A, B, H, M = MI()
th_h = H / 12 * 360
th_m = M... | import sys
import math
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))
def RN(N): return [input().strip() for i in range(N)]
def main():
A, B, H, M = MI()
th_h = (H / 12+ M / 720) * 360
... | [] | 399,490 | 399,491 | u735091636 | python |
p02677 | import math
a, b, h,m = map(int, input().split())
# 角度を求める
a_angle = (h/12 + m/(60*12)) *360
b_angle = m/60*360
#print(a_angle)
#print(b_angle)
line = 0
if a_angle > b_angle:
angle = a_angle - b_angle
elif a_angle < n_angle:
angle = b_angle - a_angle
else:
angle = 0
if angle >=180:
angle = ... | import math
a, b, h,m = map(int, input().split())
# 角度を求める
a_angle = (h/12 + m/(60*12)) *360
b_angle = m/60*360
#print(a_angle)
#print(b_angle)
line = 0
if a_angle > b_angle:
angle = a_angle - b_angle
elif a_angle < b_angle:
angle = b_angle - a_angle
else:
angle = 0
if angle >=180:
angle = ... | [
"identifier.change",
"control_flow.branch.if.condition.change"
] | 399,499 | 399,500 | u018591138 | python |
p02677 | import math
a, b, h, m = list(map(int, input().split()))
a_angle = 30 * h + 30 * m // 60
b_angle = 6 * m
angle = abs(a_angle - b_angle)
angle = min(360 - angle, angle)
c = a**2 + b**2 - 2 * a * b * math.cos(math.radians(angle))
print(c**0.5) | import math
a, b, h, m = list(map(int, input().split()))
a_angle = 30 * h + 30 * m / 60
b_angle = 6 * m
angle = abs(a_angle - b_angle)
angle = min(360 - angle, angle)
c = a**2 + b**2 - 2 * a * b * math.cos(math.radians(angle))
print(c**0.5) | [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,501 | 399,502 | u974792613 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
degree = abs(H - M*11/60)*math.pi/6
cosC = abs(math.cos(degree))
ans = (A**2 + B**2 - 2*A*B*cosC)**(0.5)
print(ans) | import math
A,B,H,M = map(int,input().split())
degree = abs(H - M*11/60)*math.pi/6
cosC = math.cos(degree)
ans = (A**2 + B**2 - 2*A*B*cosC)**(0.5)
print(ans) | [
"call.remove",
"call.arguments.change"
] | 399,511 | 399,512 | u674343825 | python |
p02677 | a, b, h, m = [int(x) for x in input().split()]
#a, b, h, m = 3, 4, 11, 0
h_dig = 360 * (float(h) / 12) + 30 * (float(m) / 60)
m_dig = 360 * (float(m) / 60)
#print(str(h_dig) + " " + str(m_dig))
abs_dig = abs(h_dig - m_dig)
if(abs_dig > 180):
abs_dig = 360 - abs_dig
#print(abs_dig)
c = math.sqrt(a ** 2 + b **... | import math
a, b, h, m = [int(x) for x in input().split()]
#a, b, h, m = 3, 4, 11, 0
h_dig = 360 * (float(h) / 12) + 30 * (float(m) / 60)
m_dig = 360 * (float(m) / 60)
#print(str(h_dig) + " " + str(m_dig))
abs_dig = abs(h_dig - m_dig)
if(abs_dig > 180):
abs_dig = 360 - abs_dig
#print(abs_dig)
c = math.sqrt(... | [] | 399,525 | 399,526 | u994400382 | python |
p02677 | import math
a, b, h, m = [int(x) for x in input().split()]
h_dig = 360 * (float(h) / 12) + 30 * (float(m) / 60)
m_dig = 360 * (float(m) / 60)
abs_dig = abs(h_dig - m_dig)
if(abs_dig > 180):
abs_dig -= 180
c = math.sqrt(a ** 2 + b ** 2 - 2 * a * b * math.cos(abs_dig / 360 * 2 * math.pi))
print('{:.09f}'.format(... | import math
a, b, h, m = [int(x) for x in input().split()]
#a, b, h, m = 3, 4, 11, 0
h_dig = 360 * (float(h) / 12) + 30 * (float(m) / 60)
m_dig = 360 * (float(m) / 60)
#print(str(h_dig) + " " + str(m_dig))
abs_dig = abs(h_dig - m_dig)
if(abs_dig > 180):
abs_dig = 360 - abs_dig
#print(abs_dig)
c = math.sqrt(... | [
"assignment.add"
] | 399,527 | 399,526 | u994400382 | python |
p02677 | from math import *
def a(m, h):
return abs(h/ 6 - m / 30) * pi
a, b, h, m = map(int, input().split())
# print(sqrt(a**2 + b**2 - 2*a*b*cos((h/ 6 + 1/(6*m) - m / 30) * pi)))
print(sqrt(a**2 + b**2 - 2*a*b*cos((h/ 6 - m / 30) * pi))) | from math import *
def a(m, h):
return abs(h/ 6 - m / 30) * pi
a, b, h, m = map(int, input().split())
# print(sqrt(a**2 + b**2 - 2*a*b*cos((h/ 6 + 1/(6*m) - m / 30) * pi)))
print(sqrt(a**2 + b**2 - 2*a*b*cos((h/ 6 + m/(360) - m / 30) * pi))) | [
"expression.operation.binary.add"
] | 399,530 | 399,531 | u064869465 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
# long 0.25rad/m short 6rad/m
deg = abs(6*M-0.5*(60*H+M))
ans = (A**2 + B**2 - 2*A*B*math.cos(math.radians(deg))) ** (1/2)
print(ans,deg) | import math
A,B,H,M = map(int,input().split())
# long 0.25rad/m short 6rad/m
deg = abs(6*M-0.5*(60*H+M))
ans = (A**2 + B**2 - 2*A*B*math.cos(math.radians(deg))) ** (1/2)
print(ans) | [
"call.arguments.change"
] | 399,540 | 399,541 | u750058957 | python |
p02677 | import math
a,b,h,m = list(map(int,input().split()))
h = h*30+0.5*m
m = m*6
d = max(h,m)-min(h,m)
print(math.sqrt(a**2+b**2-math.cos(math.radians(d)))) | import math
a,b,h,m = list(map(int,input().split()))
h = h*30+0.5*m
m = m*6
d = max(h,m)-min(h,m)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(d)))) | [
"expression.operation.binary.add"
] | 399,546 | 399,547 | u084320347 | python |
p02677 | import math
def colon(a, b, h, m):
hour = 0.5 * (h * 60 + m)
minute = 6 * m
angle = abs(hour - minute)
angle = min(360 - angle, angle)
rad = angle*0.0174533
#print(angle, rad)
ans = math.sqrt(a**2+b**2-(2*a*b*(math.cos(rad))))
return ans
a, b, h, m = map(int, input().split())
print(colon(a,b,h, m))... | import math
def colon(a, b, h, m):
hour = 0.5 * (h * 60 + m)
minute = 6 * m
angle = abs(hour - minute)
angle = min(360 - angle, angle)
rad = angle*(3.141592653589793238/180)
#print(angle, rad)
ans = math.sqrt(a**2+b**2-(2*a*b*(math.cos(rad))))
return ans
a, b, h, m = map(int, input().split())
print... | [
"assignment.value.change",
"expression.operation.binary.change"
] | 399,554 | 399,555 | u021860182 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
H_kakudo = (30 * h) + (m * 0.5)
M_kakudo = 6 * m
kakudo = abs(H_kakudo - M_kakudo)
if kakudo > 180:
kakudo = 360 - kakudo
print(kakudo)
result = (a ** 2) + (b ** 2) - (2 * a * b * math.cos(math.radians(kakudo)))
print(math.sqrt(result))
| import math
a, b, h, m = map(int, input().split())
H_kakudo = (30 * h) + (m * 0.5)
M_kakudo = 6 * m
kakudo = abs(H_kakudo - M_kakudo)
if kakudo > 180:
kakudo = 360 - kakudo
result = (a ** 2) + (b ** 2) - (2 * a * b * math.cos(math.radians(kakudo)))
print(math.sqrt(result))
| [
"call.remove"
] | 399,556 | 399,557 | u923415412 | python |
p02677 | import math
A, B, H, M = list(map(int, input().split()))
a = abs((H + M/60) / 12 * 360 - (M / 60) * 360)
if a > 180:
a -= 180
ans = A*A + B*B - 2 * A*B * math.cos(math.radians(a))
print(math.sqrt(ans))
| import sys
import math
A, B, H, M = list(map(int, input().split()))
a = abs((H + M/60) / 12 * 360 - (M / 60) * 360)
if a > 180:
a = 360 - a
ans = A*A + B*B - 2 * A*B * math.cos(math.radians(a))
print(math.sqrt(ans))
| [
"assignment.change"
] | 399,562 | 399,563 | u121192152 | python |
p02677 | A, B, H, M = map(int, input().split())
import numpy as np
hour = 30*H + M/2
t = abs(hour-60*M)
if t >= 180:
t = 360 - t
t = np.pi/180*t
ans2 = A**2 + B**2 - 2*A*B*np.cos(t)
print(np.sqrt(ans2)) | A, B, H, M = map(int, input().split())
import numpy as np
hour = 30*H + M/2
t = abs(hour-6*M)
if t >= 180:
t = 360 - t
t = np.pi/180*t
ans2 = A**2 + B**2 - 2*A*B*np.cos(t)
print(np.sqrt(ans2)) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,567 | 399,568 | u614320306 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
m = abs(6*M-30*(H+M/60))
if m>180:
m = 360-m
print((A**2+B**2-2*A*B*math.cos(m))**(1/2)) | import math
A,B,H,M = map(int, input().split())
m = abs(6*M-30*(H+M/60))
if m>180:
m = 360-m
print((A**2+B**2-2*A*B*math.cos(math.radians(m)))**(1/2))
| [
"call.add",
"call.arguments.change"
] | 399,571 | 399,572 | u531599639 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
h = h*30 + m*0.5
m = m*6
rad = abs(h-m)
if rad > 180:
rad = rad-180
c2 = a*a + b*b - 2*a*b*math.cos(math.radians(rad))
print(math.sqrt(c2)) | import math
a, b, h, m = map(int, input().split())
h = h*30 + m*0.5
m = m*6
rad = abs(h-m)
if rad > 180:
rad = 360-rad
c2 = a*a + b*b - 2*a*b*math.cos(math.radians(rad))
#print(rad)
print(math.sqrt(c2)) | [
"expression.operation.binary.remove"
] | 399,573 | 399,574 | u673173160 | python |
p02677 | import math
a,b,h,m = map(float, input().split())
rot = 5.5 * (60.0*h + m)
rad = ang * math.pi / 180
cal = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
ans = math.sqrt(cal)
print(ans) | import math
a,b,h,m = map(float, input().split())
rot = 5.5 * (60.0*h + m)
ang = rot%360
rad = ang * math.pi / 180
cal = a ** 2 + b ** 2 - 2 * a * b * math.cos(rad)
ans = math.sqrt(cal)
print(ans) | [
"assignment.add"
] | 399,575 | 399,576 | u110311725 | python |
p02677 | import math
import sys
a, b, h, m = map(int,sys.stdin.readline().rstrip().split())
deg = min(abs(30*h - 5.5*m),360-abs(30*h - 6*m))
rad=math.radians(deg)
c = math.sqrt(a**2 + b**2 -2*a*b*math.cos(rad))
print(f'{c:.9f}') | import math
import sys
a, b, h, m = map(int,sys.stdin.readline().rstrip().split())
deg = min(abs(30*h - 5.5*m),360-abs(30*h - 5.5*m))
rad=math.radians(deg)
c = math.sqrt(a**2 + b**2 -2*a*b*math.cos(rad))
print(f'{c:.9f}') | [
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,589 | 399,590 | u515740713 | python |
p02677 | import math
import numpy as np
def main():
A,B,H,M = map(int, input().split())
min = H*60+M
H_loc = min * 0.5
M_loc = M * 60
if abs(H_loc-M_loc) > 180:
theta = 360 - abs(H_loc - M_loc)
else:
theta = abs(H_loc - M_loc)
r = math.sqrt(A**2 + B**2 - 2*A*B*np.cos(n... | import math
import numpy as np
def main():
A,B,H,M = map(int, input().split())
min = H*60+M
H_loc = min * 0.5
M_loc = M * 6
if abs(H_loc-M_loc) > 180:
theta = 360 - abs(H_loc - M_loc)
else:
theta = abs(H_loc - M_loc)
#print(theta)
r = math.sqrt(A**2 + B**2... | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,594 | 399,595 | u798543098 | python |
p02677 | import math
A,B,H,M=(int(x) for x in input().split())
ang=30*H-6*M
L=math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(ang)))
print(L) | import math
A,B,H,M=(int(x) for x in input().split())
ang=30*H+0.5*M-6*M
L=math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(ang)))
print(L)
| [
"assignment.change"
] | 399,598 | 399,599 | u475402977 | python |
p02677 | A,B,H,M=map(int,input().split())
x=360*(H+M/60)/12-360*M/60
cos=math.cos(math.radians(x))
C = A**2 + B**2 - 2*A*B*(cos)
print(C**0.5) | import math
A,B,H,M=map(int,input().split())
x=360*(H+M/60)/12-360*M/60
cos=math.cos(math.radians(x))
C = A**2 + B**2 - 2*A*B*(cos)
print(C**0.5) | [] | 399,600 | 399,601 | u870297120 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
theta_1=(h+(m/60))*(math.pi/6)
theta_2=math.pi/30
theta_1=2*math.pi-(theta_1-math.pi/2)
theta_2=2*math.pi-(theta_2-math.pi/2)
y1=a*math.sin(theta_1)
x1=a*math.cos(theta_1)
y2=b*math.sin(theta_2)
x2=b*math.cos(theta_2)
print(math.sqrt((x1-x2)**2+(y1-y2)**2)) | import math
a,b,h,m=map(int,input().split())
theta_1=(h+(m/60))*(math.pi/6)
theta_2=m*(math.pi/30)
theta_1=2*math.pi-(theta_1-math.pi/2)
theta_2=2*math.pi-(theta_2-math.pi/2)
y1=a*math.sin(theta_1)
x1=a*math.cos(theta_1)
y2=b*math.sin(theta_2)
x2=b*math.cos(theta_2)
print(math.sqrt((x1-x2)**2+(y1-y2)**2)) | [
"assignment.change"
] | 399,608 | 399,609 | u314837274 | python |
p02677 | # coding:utf-8
import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools
sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in rang... | # coding:utf-8
import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools
sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in rang... | [
"call.remove"
] | 399,619 | 399,620 | u395117343 | python |
p02677 | import math
A = list(map(int, input().split()))
L = 30 * A[2] + 0.5 * A[3]
S = 6 * A[3]
print(L,S)
x = A[0]*A[0] + A[1]*A[1] - 2*A[0]*A[1]*math.cos(math.radians(min(math.fabs(L-S)%360,360-math.fabs(L-S)%360)))
print(math.sqrt(x))
| import math
A = list(map(int, input().split()))
L = 30 * A[2] + 0.5 * A[3]
S = 6 * A[3]
x = A[0]*A[0] + A[1]*A[1] - 2*A[0]*A[1]*math.cos(math.radians(min(math.fabs(L-S)%360,360-math.fabs(L-S)%360)))
print(math.sqrt(x))
| [
"call.remove"
] | 399,621 | 399,622 | u165436807 | python |
p02677 | import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
def inp():
'''
一つの... | import sys, bisect, math, itertools, heapq, collections
from operator import itemgetter
# a.sort(key=itemgetter(i)) # i番目要素でsort
from functools import lru_cache
# @lru_cache(maxsize=None)
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = float('inf')
mod = 10**9 + 7
eps = 10**-7
def inp():
'''
一つの... | [
"call.remove",
"call.arguments.change"
] | 399,623 | 399,624 | u802977614 | python |
p02677 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
x = abs(30*h + m / 2 - 60 * m)
if x <= 180:
d = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(x)))
else:
x = 360 - x
d = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(x)))
print(d) | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import math
a, b, h, m = map(int, input().split())
x = abs(30 * h + m / 2 - 6 * m)
if x <= 180:
d = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(x)))
else:
x = 360 - x
d = math.sqrt(a**2 + b**2 - 2 * a * b * math.cos(math.radians(x)))
print(d) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,625 | 399,626 | u190616335 | python |
p02677 | import math
a,b,h,m = map(int, input().split())
hrad = 30 * h + 0.5 * m
mrad = 0.5 * m
diff = abs(hrad - mrad)
if diff > 180:
diff = abs(mrad - hrad)
ans = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(diff)))
print(ans) | import math
a,b,h,m = map(int, input().split())
hrad = 30 * h + 0.5 * m
mrad = 6 * m
diff = abs(hrad - mrad)
if diff > 180:
diff = abs(mrad - hrad)
ans = math.sqrt(a*a + b*b - 2*a*b*math.cos(math.radians(diff)))
print(ans) | [
"assignment.value.change",
"expression.operation.binary.change"
] | 399,631 | 399,632 | u878173555 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
l_rad = m / 60 * 360
s_rad = h * 30 + m / 60 * 30
c_rad = abs(l_rad - s_rad) if abs(l_rad - s_rad) <= 180 else 360 - abs(l_rad - s_rad)
cos_c = math.cos(math.radians(c_rad))
if cos_c == 1:
print(0)
elif cos_c == -1:
print(a + b)
else:
print(math.sqrt(a ** 2... | import math
a, b, h, m = map(int, input().split())
l_rad = m / 60 * 360
s_rad = h * 30 + m / 60 * 30
c_rad = abs(l_rad - s_rad) if abs(l_rad - s_rad) <= 180 else 360 - abs(l_rad - s_rad)
cos_c = math.cos(math.radians(c_rad))
if cos_c == 1:
print(abs(a - b))
elif cos_c == -1:
print(a + b)
else:
print(math.sq... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 399,633 | 399,634 | u131264627 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
minutes = H * 60 + M
choshin = (minutes * 6) % 360
tanshin = (minutes * 0.5) % 360
if choshin == tanshin:
print(B - A)
else:
C = abs(choshin - tanshin)
tmp = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(C)))
print(math.sqrt(tmp))
| import math
A, B, H, M = map(int, input().split())
minutes = H * 60 + M
choshin = (minutes * 6) % 360
tanshin = (minutes * 0.5) % 360
if choshin == tanshin:
print(abs(B - A))
else:
C = abs(choshin - tanshin)
tmp = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(C)))
print(math.sqrt(tmp))
| [
"call.arguments.add",
"call.arguments.change"
] | 399,635 | 399,636 | u385873134 | python |
p02677 | # coding: utf-8
from math import pi
from math import cos
import math
def main():
A, B, H, M = map(int, input().split())
# return (A**2 + B**2 - 2*A*B*cos(math.radians(6*(5*H-M))))**0.5
return (A**2 + B**2 - 2*A*B*cos(math.radians((60*H-11*M)//2)))**0.5
print(main())
| # coding: utf-8
from math import pi
from math import cos
import math
def main():
A, B, H, M = map(int, input().split())
# return (A**2 + B**2 - 2*A*B*cos(math.radians(6*(5*H-M))))**0.5
return (A**2 + B**2 - 2*A*B*cos(math.radians((60*H-11*M)/2)))**0.5
print(main())
| [
"expression.operator.arithmetic.change",
"call.arguments.change",
"function.return_value.change",
"expression.operation.binary.change"
] | 399,637 | 399,638 | u063896676 | python |
p02677 | import sys
import math
def solution():
a,b,h,m=map(int,input().split())
mins=m*6
if(h==12):
h=0
hr=h*30+m/2
angle=min((abs(hr-mins),360-abs(hr-mins)))
c=a**2+b**2-(2*a*b*math.cos(angle*0.0174533))
c=c**(0.5)
print(c)
if __name__ == "__main__":
solution() | import sys
import math
def solution():
a,b,h,m=map(int,input().split())
mins=m*6
if(h==12):
h=0
hr=h*30+m/2
angle=min((abs(hr-mins),360-abs(hr-mins)))
c=a**2+b**2-(2*a*b*math.cos(angle*math.pi/180))
c=c**(0.5)
print(c)
if __name__ == "__main__":
solution()
| [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,656 | 399,657 | u809043290 | python |
p02677 | A,B,H,M = map(int,input().split())
import math
ans = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(30*H+0.5*M-60*M)))
print(ans)
| A,B,H,M = map(int,input().split())
import math
ans = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(30*H+0.5*M-6*M)))
print(ans)
| [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,660 | 399,661 | u446774692 | python |
p02677 | import math
a,b,h,m = map(int, input().split())
short = (h + m/60) * 30
long = m * 60
big = max(short, long)
small = min(short, long)
theta = min(big-small, (360-big) + small)
print((a**2 + b**2 - 2*a*b*math.cos(math.radians(theta)))**0.5) | import math
a,b,h,m = map(int, input().split())
short = (h + m/60) * 30
long = m * 6
big = max(short, long)
small = min(short, long)
theta = min(big-small, (360-big) + small)
print((a**2 + b**2 - 2*a*b*math.cos(math.radians(theta)))**0.5) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,664 | 399,665 | u973108807 | python |
p02677 | from math import radians, cos, sqrt
a,b,h,m = map(int,input().split())
# 時針の位置
h = h + (m/60)
longAngle = 360 * (h/12)
shortAngle = 360 * (m/60)
angle = abs(longAngle-shortAngle)
if angle > 180:
angle = angle - 180
# 余弦定理
ans = (a**2) + (b**2) - (2*a*b*cos(radians(angle)))
print(sqrt(ans)) | from math import radians, cos, sqrt
a,b,h,m = map(int,input().split())
# 時針の位置
h = h + (m/60)
longAngle = 360 * (h/12)
shortAngle = 360 * (m/60)
angle = abs(longAngle-shortAngle)
if angle > 180:
angle = 360 - angle
# 余弦定理
ans = (a**2) + (b**2) - (2*a*b*cos(radians(angle)))
print(sqrt(ans)) | [
"expression.operation.binary.remove"
] | 399,670 | 399,671 | u619084943 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
h=360*(h/12)+360*(1/12)*(m/60)
m=360*(m/60)
angle=abs(h-m)
if angle>=180:
angle-=180
ans=math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(angle))))
print(ans) | import math
a,b,h,m=map(int,input().split())
h=360*(h/12)+360*(1/12)*(m/60)
m=360*(m/60)
angle=abs(h-m)
if angle>=180:
angle=360-angle
ans=math.sqrt(a**2+b**2-(2*a*b*math.cos(math.radians(angle))))
print(ans) | [
"assignment.add"
] | 399,684 | 399,685 | u575239123 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
ang_a = 30 * h
ang_b = 6 * m
ang_c = max(ang_a, ang_b) - min(ang_a, ang_b)
if ang_c > 180: ang_c = 360 - ang_c
ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(ang_c)))
print(ans)
| import math
a, b, h, m = map(int, input().split())
ang_a = 30 * h + m / 2
ang_b = 6 * m
ang_c = max(ang_a, ang_b) - min(ang_a, ang_b)
if ang_c > 180: ang_c = 360 - ang_c
ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(math.radians(ang_c)))
print(ans)
| [
"assignment.change"
] | 399,691 | 399,692 | u907414670 | python |
p02677 | a,b,h,m = list(map(int, input().split()))
hh=360*(60*h+m)/(60*12)
mm=360*(m/60)
rad=hh-mm
if rad > 180:
rad=360-rad
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad))))
| import math
a,b,h,m = list(map(int, input().split()))
hh=360*(60*h+m)/(60*12)
mm=360*(m/60)
rad=hh-mm
if rad > 180:
rad=360-rad
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))) | [] | 399,693 | 399,694 | u687574784 | python |
p02677 | a,b,h,m = list(map(int, input().split()))
hh=360*(60*h+m)/(60*12)
mm=360*(m/60)
rad=hh-mm
if rad > 180:
rad=360-rad
print(rad)
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))) | import math
a,b,h,m = list(map(int, input().split()))
hh=360*(60*h+m)/(60*12)
mm=360*(m/60)
rad=hh-mm
if rad > 180:
rad=360-rad
print(math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))) | [
"call.remove"
] | 399,695 | 399,694 | u687574784 | python |
p02677 | import math
l=list(map(int, input().split(' ')))
a=l[0]
b=l[1]
h=l[2]
m=l[3]
hours = (h+m/60)/12
minutes = m/60
theta = 2*math.pi*(hours-minutes)
ans = a**2+b**2+2*a*b*math.cos(theta)
print(ans**0.5)
| import math
l=list(map(int, input().split(' ')))
a=l[0]
b=l[1]
h=l[2]
m=l[3]
hours = (h+m/60)/12
minutes = m/60
theta = 2*math.pi*(hours-minutes)
ans = a**2+b**2-2*a*b*math.cos(theta)
print(ans**0.5)
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,696 | 399,697 | u010379708 | python |
p02677 | #168
#c
import math
a,b,h,m = list(map(int, input().split()))
oa = (60*h + m)/2
ob = m*60
cos_ab = math.cos(math.radians(oa-ob))
c = (a**2 + b**2 -2*a*b*cos_ab)**0.5
print(c) | #168
#c
import math
a,b,h,m = list(map(int, input().split()))
oa = (60*h + m)/2
ob = m*6
cos_ab = math.cos(math.radians(oa-ob))
c = abs((a**2 + b**2 -2*a*b*cos_ab)**0.5)
print(c)
| [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.add",
"call.arguments.change"
] | 399,698 | 399,699 | u816265237 | python |
p02677 | import math
a,b,h,m = map(int, input().split())
theta_h = (60 * h + m)/2
theta_m = 60 * m
the = abs(theta_h -theta_m)
the = min(the, 360 - the)
r = (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(the))) ** (1/2)
print(r) | import math
a,b,h,m = map(int, input().split())
theta_h = (60 * h + m)/2
theta_m = 6 * m
the = abs(theta_h -theta_m)
the = min(the, 360 - the)
r = (a ** 2 + b ** 2 - 2 * a * b * math.cos(math.radians(the))) ** (1/2)
print(r) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,706 | 399,707 | u091489347 | python |
p02677 | #!/usr/bin/env python3
import sys
import collections
import math
sys.setrecursionlimit(10 ** 7)
# 1 ✕ N
A, B, C, D = list(map(int, input().rstrip().split()))
ar = (360 / 12) * C
br = (360 / 60) * D
print(math.sqrt(A * A + B * B - (2 * A * B * math.cos(math.radians(abs(ar - br))))))
| #!/usr/bin/env python3
import sys
import collections
import math
sys.setrecursionlimit(10 ** 7)
# 1 ✕ N
A, B, C, D = list(map(int, input().rstrip().split()))
ar = (360 / 12) * C + D * 0.5
br = (360 / 60) * D
print(math.sqrt(A * A + B * B - (2 * A * B * math.cos(math.radians(abs(ar - br))))))
| [
"assignment.change"
] | 399,710 | 399,711 | u017723605 | python |
p02677 | import math
A,B,H,M = (int(x) for x in input().split())
h = 360*H/12 + 30*M/60
m = 360*M/60
c = abs(h-m)
if(c > 180):
c -= 180
C = A**2 + B**2 - 2*A*B*math.cos(math.radians(c))
if c != 180 and c != 0:
print(math.sqrt(C))
elif c == 180:
print(A+B)
else:
print(abs(A-B)) | import math
A,B,H,M = (int(x) for x in input().split())
h = 360*H/12 + 30*M/60
m = 360*M/60
c = abs(h-m)
if(c > 180):
c = 360 - c
C = A**2 + B**2 - 2*A*B*math.cos(math.radians(c))
if c != 180 and c != 0:
print(math.sqrt(C))
elif c == 180:
print(A+B)
else:
print(abs(A-B)) | [
"assignment.add"
] | 399,712 | 399,713 | u107601154 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
hour = 30 * (M / 60) + 360 * (H / 12)
minute = 360 * (M / 60)
if hour > minute:
degree = hour - minute
else:
degree = minute - hour
degree = degree - 180 if degree - 180 > 0 else degree
length = A**2 + B**2 - 2 * A * B * math.cos(math.radians(degree))
print... | import math
A, B, H, M = map(int, input().split())
hour = 30 * (M / 60) + 360 * (H / 12)
minute = 360 * (M / 60)
if hour > minute:
degree = hour - minute
else:
degree = minute - hour
degree = 360 - degree if degree > 180 else degree
length = A**2 + B**2 - 2 * A * B * math.cos(math.radians(degree))
print(mat... | [
"assignment.value.change",
"identifier.replace.remove",
"literal.replace.add",
"expression.operation.binary.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.remove",
"literal.number.integer.change"
] | 399,716 | 399,717 | u345389118 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.