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 | import math
A, B, H, M = map(int, input().split())
angle = abs(H / 12 - M / 60) * 2 * math.pi
ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(angle))
print(ans)
| import math
A, B, H, M = map(int, input().split())
angle = abs((H + M / 60) / 12 - M / 60) * 2 * math.pi
ans = math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(angle))
print(ans)
| [
"call.arguments.change"
] | 398,555 | 398,556 | u685998974 | python |
p02677 | from math import sqrt, cos, pi
a, b, h, m = map(int, input().split())
rot_a = h*30 + m*0.5
rot_b = m*6
rot = rot_a-rot_b if rot_a>rot_b else rot_b-rot_a
if rot > 180:
rot = min(rot_a, rot_b) + 360 - max(rot_a, rot_b)
ans = sqrt(a**2 + b**2 - 2*a*b*cos(rot*pi/180))
print(rot)
print(ans) | from math import sqrt, cos, pi
a, b, h, m = map(int, input().split())
rot_a = h*30 + m*0.5
rot_b = m*6
rot = rot_a-rot_b if rot_a>rot_b else rot_b-rot_a
if rot > 180:
rot = min(rot_a, rot_b) + 360 - max(rot_a, rot_b)
ans = sqrt(a**2 + b**2 - 2*a*b*cos(rot*pi/180))
print(ans) | [
"call.remove"
] | 398,574 | 398,575 | u268183312 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
KA = H / 12 * 360 + ((M / 60) * (360 / 12))
KB = M / 60 * 360
K = abs(KA - KB)
if K > 180:
K = 360 - K
# if K == 180:
# print(A + B)
# exit()
# if K == 0:
# print(abs(B - A))
# exit()
# cosB = round(math.cos(math.radians(K)), 13)
cosB = math.cos(... | import math
A, B, H, M = map(int, input().split())
KA = H / 12 * 360 + ((M / 60) * (360 / 12))
KB = M / 60 * 360
K = abs(KA - KB)
if K > 180:
K = 360 - K
# if K == 180:
# print(A + B)
# exit()
# if K == 0:
# print(abs(B - A))
# exit()
# cosB = round(math.cos(math.radians(K)), 13)
cosB = math.cos(... | [] | 398,581 | 398,582 | u186542450 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
h=h+m/60
h=h/12*360
m=m/60*360
d=abs(h-m)
if d>180:
d=d-180
print((a**2+b**2-2*a*b*math.cos(math.radians(d)))**(1/2)) | import math
a,b,h,m=map(int,input().split())
h=h+m/60
h=h/12*360
m=m/60*360
d=abs(h-m)
if d>180:
d=360-d
print((a**2+b**2-2*a*b*math.cos(math.radians(d)))**(1/2)) | [
"expression.operation.binary.remove"
] | 398,583 | 398,584 | u958053648 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
pi = math.pi
ta = 30*H + 0.5*M
tb = 6*M
t = math.fabs( ta - tb )
if t > 180.0:
t = 360.0 - t
print(t)
t = (t*pi)/180.0
ans = A*A + B*B - 2*A*B*math.cos(t)
print("{:.9f}".format(math.sqrt(ans)))
| import math
A, B, H, M = map(int, input().split())
pi = math.pi
ta = 30*H + 0.5*M
tb = 6*M
t = math.fabs( ta - tb )
if t > 180.0:
t = 360.0 - t
#print(t)
t = (t*pi)/180.0
ans = A*A + B*B - 2*A*B*math.cos(t)
print("{:.9f}".format(math.sqrt(ans)))
| [
"call.remove"
] | 398,587 | 398,588 | u225493896 | python |
p02677 | import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) < 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = abs(rand3 - rand2) - 180
ans = math.sqrt(pow(a,2) + p... | import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) <= 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = 360 - abs(rand3 - rand2)
ans = math.sqrt(pow(a,2) +... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 398,599 | 398,600 | u928758473 | python |
p02677 | import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) <= 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = abs(rand3 - rand2) - 180
ans = math.sqrt(pow(a,2) + pow(b... | import os
import math
def main():
a,b,h,m = map(int, input().split())
rand2 = 6 * m
rand3 = (0.5 * m) + (30 * h)
rand_result = 0.0
if (abs(rand3 - rand2) <= 180):
rand_result = abs(rand3 - rand2)
else:
rand_result = 360 - abs(rand3 - rand2)
ans = math.sqrt(pow(a,2) +... | [
"expression.operation.binary.remove"
] | 398,602 | 398,600 | u928758473 | python |
p02677 | a, b, h, m = map(int, input().split())
h_angle = h * 30 + m /2
m_angle = m * 2
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(m_angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | a, b, h, m = map(int, input().split())
h_angle = h * 30 + m /2
m_angle = m * 6
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"identifier.change",
"call.arguments.change"
] | 398,605 | 398,606 | u717695824 | python |
p02677 | a, b, h, m = map(int, input().split())
h_angle = h * 30
m_angle = m * 6
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | a, b, h, m = map(int, input().split())
h_angle = h * 30 + m /2
m_angle = m * 6
angle = h_angle - m_angle
import math
angle_cos = math.cos(math.radians(angle))
c_2 = a ** 2 + b ** 2 - 2 * a * b * angle_cos
c = math.sqrt(c_2)
print(c) | [
"assignment.change"
] | 398,607 | 398,606 | u717695824 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
H=((h%12)*30)
M=(m*6)
x=abs(H-M)
y=360-x
l=[x,y]
l.sort()
sita=l[0]
sita=math.radians(sita)
c=a**2+b**2-2*(a*b*math.cos(sita))
c=math.sqrt(c)
print(c)
| import math
a,b,h,m=map(int,input().split())
H=((h%12)*30)+0.5*m
M=(m*6)
x=abs(H-M)
y=360-x
l=[x,y]
l.sort()
sita=l[0]
sita=math.radians(sita)
c=a**2+b**2-2*(a*b*math.cos(sita))
c=math.sqrt(c)
print(c) | [
"assignment.change"
] | 398,635 | 398,636 | u901598613 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
dh=30*h+m/2
dm=6*m
if dm==dh:
rad=0
else:
rad=abs(dm-dh)
if rad>180:
rad=rad-180
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif 0<rad and rad<180:
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif rad==180... | import math
a,b,h,m=map(int,input().split())
dh=30*h+m/2
dm=6*m
if dm==dh:
rad=0
else:
rad=abs(dm-dh)
if rad>180:
rad=360-rad
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif 0<rad and rad<180:
length=math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(rad)))
elif rad==180... | [
"expression.operation.binary.remove"
] | 398,652 | 398,653 | u125348436 | python |
p02677 | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.radians(math.cos(sita))
c = math.sqrt(c2)
print(c) | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(sita))
c = math.sqrt(c2)
print(c)
| [
"assignment.value.change",
"identifier.change",
"expression.operation.binary.change",
"call.arguments.change"
] | 398,654 | 398,655 | u569421930 | python |
p02677 | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*int(math.cos(sita))
c = math.sqrt(c2)
print(c) | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(sita))
c = math.sqrt(c2)
print(c)
| [
"call.remove",
"call.arguments.add"
] | 398,656 | 398,655 | u569421930 | python |
p02677 | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.cos(sita)
c = math.sqrt(c2)
print(c) | import math
a,b,h,m = map(int,input().split())
num1 = m * 6
num2 = h * 30 + m * 0.5
if num1 >= num2:
sita = num1 - num2
else:
sita = num2 - num1
c2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(sita))
c = math.sqrt(c2)
print(c)
| [
"call.add",
"call.arguments.change"
] | 398,657 | 398,655 | u569421930 | python |
p02677 | # coding: utf-8
# Your code here!
import math
a,b,h,m=map(int,input().split())
h=h+1/60*m
if(h>m):
d=h-m
else:
d=m-h
d*=30
c=a**2+b**2-2*a*b*math.cos(math.radians(d))
print('{:.23f}'.format(c**(1/2)))
| # coding: utf-8
# Your code here!
import math
a,b,h,m=map(int,input().split())
h=(h+1/60*m)*5
#print(h)
if(h>m):
d=h-m
else:
d=m-h
d*=6
c=a**2+b**2-2*a*b*math.cos(math.radians(d))
print('{:.23f}'.format(c**(1/2)))
| [
"literal.number.integer.change"
] | 398,662 | 398,661 | u983367697 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
long = M * 6
short = (H*60 + M) * 0.5
k = short - long
if k > 180:
k -= 180
a = (A**2) + (B**2) - (2*A*B*math.cos(math.radians(k)))
print(a**(1/2)) | import math
A, B, H, M = map(int, input().split())
long = M * 6
short = (H*60 + M) * 0.5
k = short - long
if k > 180:
k = 360 - k
a = (A**2) + (B**2) - (2*A*B*math.cos(math.radians(k)))
print(a**(1/2)) | [
"assignment.add"
] | 398,668 | 398,669 | u703823201 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
long = M * 6
short = (H*60 + M) * 0.5
k = short - long
if k >= 180:
k -= 180
a = (A**2) + (B**2) - (2*A*B*math.cos(math.radians(k)))
print(a**(1/2)) | import math
A, B, H, M = map(int, input().split())
long = M * 6
short = (H*60 + M) * 0.5
k = short - long
if k > 180:
k = 360 - k
a = (A**2) + (B**2) - (2*A*B*math.cos(math.radians(k)))
print(a**(1/2)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 398,670 | 398,669 | u703823201 | python |
p02677 | import math
import sys
import numpy as np
a,b,h,m=map(int,input().split())
h=h*30+m*0.5
m=m*6
ma=max(h,m)
mi=min(h,m)
kakudo=abs(ma-mi)
if kakudo>180:
kakudo-=180
elif kakudo == 0:
print(abs(a-b))
exit()
elif kakudo==180:
print(a+b)
exit()
#print(kakudo)
c=math.cos(math.radians(kakudo))
#print(c)
an... | import math
import sys
import numpy as np
a,b,h,m=map(int,input().split())
h=h*30+m*0.5
m=m*6
ma=max(h,m)
mi=min(h,m)
kakudo=abs(ma-mi)
if kakudo>180:
kakudo=360-kakudo
elif kakudo == 0:
print(abs(a-b))
exit()
elif kakudo==180:
print(a+b)
exit()
#print(kakudo)
c=math.cos(math.radians(kakudo))
#print... | [
"assignment.add"
] | 398,679 | 398,680 | u113107956 | python |
p02677 | import math
A,B,H,M = list(map(int,input().split()))
h = 360 / 12 * H
m = 360 /720 * M
Cs1 = math.fabs(h - m)
Cs2 = math.fabs(360 - Cs1)
Csl = [Cs1,Cs2]
Cs = min(Csl)
C = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(math.radians(Cs)))
print(C) | import math
A,B,H,M = list(map(int,input().split()))
h = 360 / 720 * M + 30 * H
m = 360 / 60 * M
Cs1 = math.fabs(h - m)
Cs2 = math.fabs(360 - Cs1)
Csl = [Cs1,Cs2]
Cs = min(Csl)
C = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(math.radians(Cs)))
print(C) | [
"assignment.remove",
"assignment.change",
"assignment.add"
] | 398,681 | 398,682 | u847727454 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(B - A)
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(abs(B - A))
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | [
"call.arguments.add",
"call.arguments.change"
] | 398,694 | 398,695 | u594062653 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(0)
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(abs(B - A))
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 398,696 | 398,695 | u594062653 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(0)
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(abs(B - A))
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 398,697 | 398,695 | u594062653 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(B - A)
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | import math
A,B,H,M = map(int, input().split())
tan = H * 30 + M * 0.5
tyo = M * 6
C2 = 0
kaku = abs(tan - tyo)
if kaku > 180 :
kaku = 360 - kaku
if kaku == 180 :
print(A + B)
elif kaku == 0 :
print(abs(B - A))
else:
C2 = A**2 + B**2 - 2*A*B*math.cos(math.radians(kaku))
print(math.sqrt(C2)) | [
"call.arguments.add",
"call.arguments.change"
] | 398,698 | 398,695 | u594062653 | python |
p02677 | import math
A, B, H, M = map(int,input().split())
rad_M = math.radians(60*M)
rad_H = math.radians(30*H+0.5*M)
rad = abs(rad_M-rad_H)
if rad >= math.pi:
rad = 2*math.pi - rad
S = (A**2) + (B**2) - 2*A*B*math.cos(rad)
S = S**0.5
print(S) | import math
A, B, H, M = map(float,input().split())
rad_M = math.radians(6*M)
rad_H = math.radians(30*H+0.5*M)
rad = abs(rad_M-rad_H)
if rad >= math.pi:
rad = 2*math.pi - rad
S = (A**2) + (B**2) - 2*A*B*math.cos(rad)
S = S**0.5
print(S) | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"literal.number.integer.change",
"expression.operation.binary.change"
] | 398,703 | 398,704 | u661647607 | python |
p02677 |
import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo -= 360 - kakudo
# print(kakudo)
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(round(math.radians(kakudo),100)),100)... | import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo = 360 - kakudo
# print(kakudo)
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(math.radians(kakudo)),100))
print(ans) | [
"assignment.value.change",
"call.remove",
"call.arguments.change"
] | 398,710 | 398,709 | u023762741 | python |
p02677 | import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo -= 180
# print(kakudo)
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(math.radians(kakudo)),100))
print(ans) | import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo = 360 - kakudo
# print(kakudo)
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(math.radians(kakudo)),100))
print(ans) | [
"assignment.add"
] | 398,711 | 398,709 | u023762741 | python |
p02677 | import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo -= 180
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(math.radians(kakudo)),20))
print(ans) | import math
Line = [int(s) for s in input().split()]
A,B,H,M = Line[0],Line[1],Line[2],Line[3]
# print(A,B,H,M)
kakudo = abs( H/12*360 + M/12/60*360 - M/60*360 )
if kakudo > 180 :
kakudo = 360 - kakudo
# print(kakudo)
ans = math.sqrt(A**2 + B**2 - 2*A*B*round(math.cos(math.radians(kakudo)),100))
print(ans) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 398,712 | 398,709 | u023762741 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
dA=(60*H+M)/2
dB=6*M
rad=dA-dB
print(rad)
C=math.radians(rad)
c=(A**2+B**2-2*A*B*math.cos(C))**0.5
print(format(c,'.10f')) | import math
A,B,H,M=map(int,input().split())
dA=(60*H+M)/2
dB=6*M
rad=dA-dB
C=math.radians(rad)
c=(A**2+B**2-2*A*B*math.cos(C))**0.5
print(format(c,'.10f'))
| [
"call.remove"
] | 398,719 | 398,720 | u299311763 | python |
p02677 | import math
a,b,c,d = map(float,input().split())
H = 30
M = 6
HM = 0.5
kakudo = abs((c*H+d*HM) - d*M)
if kakudo == 180:
print(a+b)
elif kakudo == 0:
print(0)
else:
print(math.sqrt(pow(a,2) + pow(b,2) - 2*a*b*math.cos(math.radians(kakudo)))) | import math
a,b,c,d = map(float,input().split())
H = 30
M = 6
HM = 0.5
kakudo = abs((c*H+d*HM) - d*M)
if kakudo == 180:
print(a+b)
elif kakudo == 0:
print(abs(a-b))
else:
print(math.sqrt(pow(a,2) + pow(b,2) - 2*a*b*math.cos(math.radians(kakudo)))) | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 398,739 | 398,740 | u929996201 | python |
p02677 | import math
a,b,h,m=[int(x) for x in input().rstrip().split()]
now_h=h*60*0.5+m*0.5
now_m=m*6
# if h==0:
# now_h=360
# if m==0:
# now_m=360
kakudo=int(abs(now_h-now_m))
kakudo=math.cos(math.radians(kakudo))
print((a**2+b**2-2*a*b*kakudo)**0.5)
| import math
a,b,h,m=[int(x) for x in input().rstrip().split()]
now_h=h*60*0.5+m*0.5
now_m=m*6
# if h==0:
# now_h=360
# if m==0:
# now_m=360
kakudo=(abs(now_h-now_m))
kakudo=math.cos(math.radians(kakudo))
print((a**2+b**2-2*a*b*kakudo)**0.5)
| [] | 398,745 | 398,746 | u235376569 | python |
p02677 | from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
print(mne,hne)
if hne == mne:
print(abs(a-b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,... | from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
if hne == mne:
print(abs(a-b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,360-theta)
t ... | [
"call.remove"
] | 398,762 | 398,763 | u101839330 | python |
p02677 | from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
if hne == mne:
print(abs(a+b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,360-theta)
t = co... | from math import cos,radians
a,b,h,m = map(int,input().split())
mne = (360/60)*m
hne = (360/12)*h + (30*(mne/360))
if hne == mne:
print(abs(a-b))
exit()
elif abs(hne - mne) == 180:
print(a+b)
exit()
elif hne > mne:
theta = hne - mne
else:
theta = mne -hne
theta = min(theta,360-theta)
t ... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 398,764 | 398,763 | u101839330 | python |
p02677 | import math
A,B,H,M= map(int,input().split())
theta = abs(30*H+(M/720)-6*M)
#print(theta)
theta = min(theta, 360-theta)
#print(theta)
theta = math.radians(theta)
X2 = pow(A,2)+pow(B,2)-2*A*B*math.cos(theta)
print(math.sqrt(X2))
| import math
A,B,H,M= map(int,input().split())
theta = abs(30*H+(M/2)-6*M)
theta = min(theta, 360-theta)
theta = math.radians(theta)
X2 = pow(A,2)+pow(B,2)-2*A*B*math.cos(theta)
print(math.sqrt(X2))
| [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 398,767 | 398,768 | u696499790 | python |
p02677 | from math import cos, sqrt, pi
A, B, H, M = map(int, input().split())
th = ((H * 60 + M) * 5.5 % 360) * pi / 180
print(sqrt(A*A + B*B - A*B*cos(th))) | from math import cos, sqrt, pi
A, B, H, M = map(int, input().split())
th = float(((H * 60 + M) * 5.5 % 360) * pi / 180)
print(sqrt(A*A + B*B - 2*A*B*cos(th))) | [
"call.add",
"call.arguments.change"
] | 398,769 | 398,770 | u675168568 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
rad_h = (2 * math.pi / 12) * h
rad_m = (2 * math.pi / 60) * m
# print(rad_h)
# print(rad_m)
theta = abs(rad_h - rad_m)
# print(theta)
# print(math.cos(theta))
# print(theta * 360 / 2 / math.pi)
# x_2 = a ** 2 + b ** 2 - 2 * a * b * math.cos(theta)
# print(x_2)
x = ... | import math
a, b, h, m = map(int, input().split())
rad_h = (2 * math.pi / 12) * (h + m / 60)
rad_m = (2 * math.pi / 60) * m
# print(rad_h)
# print(rad_h * 360 / 2 / math.pi)
# print(rad_m)
# print(rad_m * 360 / 2 / math.pi)
theta = abs(rad_h - rad_m)
# print(theta)
# print(math.cos(theta))
# print(theta * 360 / 2 / ... | [] | 398,775 | 398,776 | u373594825 | python |
p02677 | import numpy as np
A, B, H, M = list(map(int, input().split()))
long_rad = (H % 12) / 12. + M / (12. * 60)
short_rad = M / 60.
sub_rad = (np.abs(long_rad - short_rad))
if sub_rad > 1 / 2.:
sub_rad -= 1 / 2.
x = (A * np.cos(2 * np.pi * sub_rad))
y = (A * np.sin(2 * np.pi * sub_rad))
print(np.sqrt(y ** 2 + (B - x... | import numpy as np
A, B, H, M = list(map(int, input().split()))
long_rad = (H % 12) / 12. + M / (12. * 60)
short_rad = M / 60.
sub_rad = (np.abs(long_rad - short_rad))
if sub_rad > 1 / 2.:
sub_rad = 1 - sub_rad
x = (A * np.cos(2 * np.pi * sub_rad))
y = (A * np.sin(2 * np.pi * sub_rad))
print(np.sqrt(y ** 2 + (B... | [
"assignment.add"
] | 398,777 | 398,778 | u458925609 | python |
p02677 | import sys
import math
A,B,H,M = list(map(int,input().split()))
rad_B = M * 6
rad_A = H * 30 + M * 0.5
if rad_A < rad_B:
rad_C = rad_A - rad_B
elif rad_A > rad_B:
rad_C = rad_B - rad_A
elif rad_A == rad_B:
rad_C = 0
rad_C = abs(rad_C)
if rad_C > 180:
rad_C = 360 - rad_C
#print(rad_A,rad_B,rad_C)
... | import sys
import math
A,B,H,M = list(map(int,input().split()))
rad_B = M * 6
rad_A = H * 30 + M * 0.5
if rad_A < rad_B:
rad_C = rad_A - rad_B
elif rad_A > rad_B:
rad_C = rad_B - rad_A
elif rad_A == rad_B:
rad_C = 0
rad_C = abs(rad_C)
if rad_C > 180:
rad_C = 360 - rad_C
#print(rad_A,rad_B,rad_C)
... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 398,779 | 398,780 | u231518782 | python |
p02677 | import numpy as np
a, b, h, m = map(int, input().split())
w1 = 360 * (h/12)
w2 = 360 * (m/60)
s = min(abs(w1-w2), 360-abs(w1-w2))
rad = np.deg2rad(s)
d = np.cos(rad)
ans = (a**2 + b**2 - 2*a*b*d)**0.5
print(ans)
| import numpy as np
a, b, h, m = map(int, input().split())
w1 = 360 * ((h+m/60)/12)
w2 = 360 * (m/60)
s = min(abs(w1-w2), 360-abs(w1-w2))
rad = np.deg2rad(s)
d = np.cos(rad)
ans = (a**2 + b**2 - 2*a*b*d)**0.5
print(ans)
| [] | 398,785 | 398,786 | u826785572 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
dig_h = (((h * 60) + m) / (12 * 60)) * 360
dig_m = (m / 60) * 360
if dig_h - dig_m < 0:
ans = dig_m - dig_h
if ans > 180:
ans *= -1
ans += 360
#ans = 360 - ans
elif dig_h - dig_m > 180:
ans = 360 - (dig_h - dig_m)
else:
ans = ... | import math
a, b, h, m = map(int, input().split())
dig_h = (((h * 60) + m) / (12 * 60)) * 360
dig_m = (m / 60) * 360
if dig_h - dig_m < 0:
ans = dig_m - dig_h
if ans > 180:
ans *= -1
ans += 360
#ans = 360 - ans
elif dig_h - dig_m > 180:
ans = 360 - (dig_h - dig_m)
else:
ans = ... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.add"
] | 398,793 | 398,794 | u277953073 | python |
p02677 | import math
A,B,H,M = map(int, input().split())
# 12時からの角度を求める
# [1分あたりに進む角度]=360÷(12×60)
tansin = (H*60+M)*0.5
tyosin = M*6
kakudo = tansin - tyosin
print(kakudo)
ans = (A**2)+(B**2)-(2*A*B*math.cos(math.radians(kakudo)))
print(math.sqrt(ans)) | import math
A,B,H,M = map(int, input().split())
# 12時からの角度を求める
# [1分あたりに進む角度]=360÷(12×60)
tansin = (H*60+M)*0.5
tyosin = M*6
kakudo = tansin - tyosin
ans = (A**2)+(B**2)-(2*A*B*math.cos(math.radians(kakudo)))
print(math.sqrt(ans)) | [
"call.remove"
] | 398,797 | 398,798 | u542739769 | python |
p02677 | import numpy as np
A,B,H,M = map(int,input().split())
th_a = 30*H
th_b = 6*M
theta = th_a -th_b
if theta <= 0:
theta = -theta
if theta >= 180:
theta = 360 - theta
if theta == 0:
if A >= B:
print(A-B)
else:
print(B-A)
elif theta == 180:
print(A+B)
else:
print(np.sqrt(A**2 + B**2 - 2*A*B*np.co... | import numpy as np
A,B,H,M = map(int,input().split())
th_a = 30*H + 0.5 * M
th_b = 6*M
theta = th_a -th_b
if theta <= 0:
theta = -theta
if theta >= 180:
theta = 360 - theta
if theta == 0:
if A >= B:
print(A-B)
else:
print(B-A)
elif theta == 180:
print(A+B)
else:
print(np.sqrt(A**2 + B**2 - 2*... | [
"assignment.change"
] | 398,811 | 398,812 | u693410938 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
pi = math.pi
Hrad = (H+(M/60))*2*pi/12
Mrad = M*2*pi/60
d = abs(Hrad-Mrad)
if d >= pi:
d = pi-d
print(math.sqrt(A**2+B**2-2*A*B*math.cos(d))) | import math
A, B, H, M = map(int, input().split())
pi = math.pi
Hrad = (H+(M/60))*2*pi/12
Mrad = M*2*pi/60
d = abs(Hrad-Mrad)
# print(math.degrees(d))
if d >= pi:
d = 2*pi - d
# print(math.degrees(d))
print(math.sqrt(A**2+B**2-2*A*B*math.cos(d))) | [
"assignment.change"
] | 398,819 | 398,818 | u487575070 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A-B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif%180
print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
| import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A-B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif
print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
| [
"expression.operation.binary.remove"
] | 398,827 | 398,828 | u423966555 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A-B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif%180
print(math.sqrt(pow(A,2)+pow(B,2)-(2*A*B*math.cos(math.radians(deg)))))
| import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A-B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif
print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
| [
"expression.operation.binary.remove",
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.unary.add"
] | 398,829 | 398,828 | u423966555 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A+B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif%180
print(math.sqrt(pow(A,2)+pow(B,2)-(2*A*B*math.cos(math.radians(deg)))))
| import math
A, B, H, M = map(int, input().split())
a = 6*M
b = 30*H + 0.5*M
if a==b:
print(abs(A-B))
exit()
elif a < b:
dif = b - a
else:
dif = a - b
if int(dif) == 180:
print(A+B)
else:
deg = dif
print(math.sqrt(pow(A,2)+pow(B,2)+(-2*A*B*math.cos(math.radians(deg)))))
| [
"misc.opposites",
"expression.operator.arithmetic.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change",
"expression.operation.binary.remove",
"expression.operation.unary.add"
] | 398,830 | 398,828 | u423966555 | python |
p02677 | import math
a, b, H, M = map(int, input().rstrip().split())
if H == 0 and M == 0:
print(0)
else:
H = H * 5 + (float(M) / 12)
kakudo = abs(H - M)
kakudo *= 6
print(math.sqrt(float(a * a) + float(b * b) - 2 * a * b * math.cos(math.radians(kakudo))))
| import math
a, b, H, M = map(int, input().rstrip().split())
if H == 0 and M == 0:
print(abs(a-b))
else:
H = H * 5 + (float(M) / 12)
kakudo = abs(H - M)
kakudo *= 6
print(math.sqrt(float(a * a) + float(b * b) - 2 * a * b * math.cos(math.radians(kakudo))))
| [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 398,839 | 398,840 | u541921833 | python |
p02677 | import math
a,b,h,m = [int(x) for x in input().split()]
x = (h*60+m)/2
y = 6*m
angle = abs(x - y)
angle = min(360 - angle, angle)
pi = 3.14159265358979323
k = math.pi/180
if angle==180:
print(a+b)
elif(angle==0):
print(0.0000000000)
else:
angle = angle*k
p = math.cos(angle)
if(p<-... | import math
a,b,h,m = [int(x) for x in input().split()]
x = (h*60+m)/2
y = 6*m
angle = abs(x - y)
angle = min(360 - angle, angle)
pi = 3.14159265358979323
k = math.pi/180
if angle==180:
print(a+b)
elif(angle==0):
print(abs(a-b))
else:
angle = angle*k
p = math.cos(angle)
if(p<-1):
... | [
"identifier.replace.add",
"literal.replace.remove",
"call.arguments.change",
"io.output.change",
"call.arguments.add"
] | 398,855 | 398,856 | u332870896 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
# 時針(0時からa時)の角度
j = 360/(12*60) * (h*60+m)
# 分針の角度
f = 360/60 * m
# 余弦定理に使う角度
beta = int(abs(j-f))
# 角度が180度より大きい時は360度から引く
if beta>180:
beta = 360-beta
print(math.sqrt((a**2)+(b**2)-2*a*b*math.cos(math.radians(beta)))) | import math
a, b, h, m = map(int, input().split())
# 時針(0時からa時)の角度
j = 360/(12*60) * (h*60+m)
# 分針の角度
f = 360/60 * m
# 余弦定理に使う角度
beta = abs(j-f)
# 角度が180度より大きい時は360度から引く
if beta>180:
beta = 360-beta
print(math.sqrt((a**2)+(b**2)-2*a*b*math.cos(math.radians(beta)))) | [
"call.remove",
"call.arguments.change"
] | 398,862 | 398,863 | u548986948 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
angh = H*30+M*0.5
angm = M*6
ang = abs(angh - angm)%180
C = (A**2+B**2-2*A*B*math.cos(math.radians(ang)))**0.5
print(C) | import math
A,B,H,M = map(int,input().split())
angh = H*30+M*0.5
angm = M*6
ang = abs(angh - angm)%360
C = (A**2+B**2-2*A*B*math.cos(math.radians(ang)))**0.5
print(C) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 398,868 | 398,869 | u662615460 | python |
p02677 | import math
a,b,h,m = map(int , input().split())
long_needle =(5 * m)/60 + h * 5
sort_needle = m
ans = math.sqrt(a**2 + b **2 - 2*a*b*abs(math.cos(abs(math.pi*(long_needle-sort_needle))/30)))
print(ans)
| import math
a,b,h,m = map(int , input().split())
long_needle =(5 * m)/60 + h * 5
sort_needle = m
ans = math.sqrt(a**2 + b **2 - 2*a*b*math.cos(abs(math.pi*(long_needle-sort_needle))/30))
print(ans)
| [
"call.remove",
"call.arguments.change"
] | 398,874 | 398,875 | u210828934 | python |
p02677 |
import math
import sys
a,b,h,m = map(int,input().split())
if b>a:
a,b = b,a
longd = 30*h + m/2
shortd = 360*m/60
# print(longd,shortd)
if abs(longd-shortd) > 180:
dist = 360-abs(longd-shortd)
elif longd-shortd==0:
print(abs(longd-shortd))
sys.exit()
elif abs(longd-shortd) == 180:
print(abs(longd... | import math
import sys
a,b,h,m = map(int,input().split())
if b>a:
a,b = b,a
longd = 30*h + m/2
shortd = 360*m/60
# print(longd,shortd)
if abs(longd-shortd) > 180:
dist = 360-abs(longd-shortd)
elif longd-shortd==0:
print(abs(a-b))
sys.exit()
elif abs(longd-shortd) == 180:
print(abs(a+b))
sys.e... | [
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"io.output.change"
] | 398,879 | 398,880 | u521866787 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
s=abs(0.5*(H*60+M)-6*M)
a=math.radians(s)
h=A**2+B**2
minus=2*A*B*math.cos(a)
ans=(h-minus)**(1/2)
| import math
A,B,H,M=map(int,input().split())
s=abs(0.5*(H*60+M)-6*M)
a=math.radians(s)
h=A**2+B**2
minus=2*A*B*math.cos(a)
ans=(h-minus)**(1/2)
print(ans) | [
"call.add"
] | 398,883 | 398,884 | u921352252 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
angle_h = 30 * h
angle_m = 6 * m
angle = abs(angle_h - angle_m)
if angle > 180:
angle = 360 - angle
bx = math.cos(math.radians(angle)) * b
by = math.sin(math.radians(angle)) * b
print(math.sqrt(((bx - a)**2) + (by**2)))
| import math
a, b, h, m = map(int, input().split())
angle_h = 30 * (h + m / 60)
angle_m = 6 * m
angle = abs(angle_h - angle_m)
if angle > 180:
angle = 360 - angle
bx = math.cos(math.radians(angle)) * b
by = math.sin(math.radians(angle)) * b
print(math.sqrt(((bx - a)**2) + (by**2)))
| [] | 398,887 | 398,888 | u679439110 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
#1分間に進む分針 360/60=6度
#1時間に進む時針 360/12=30度
#1分間に進む時針 30/60=0.5度
r=abs((h*30+m*0.5)-(m*6))
s1=math.sqrt(a**2+b**2-(2*a*b*(math.cos(math.radians(r)))))
print(s) | import math
a,b,h,m=map(int,input().split())
#1分間に進む分針 360/60=6度
#1時間に進む時針 360/12=30度
#1分間に進む時針 30/60=0.5度
r=abs((h*30+m*0.5)-(m*6))
s=math.sqrt(a**2+b**2-(2*a*b*(math.cos(math.radians(r)))))
print(s) | [
"assignment.variable.change",
"identifier.change"
] | 398,898 | 398,899 | u067447457 | python |
p02677 | import math
s = list(map(float,input().split()))
print(s)
if(s[2] <= 12):
dig = (360 * (s[2] / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60
else:
dig = (360 * ((s[2] - 12) / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60
l = s[0] * s[0] + s[1] * s[1] - 2 * s[0] * s[1] * math.cos(math.radians(dig))
le = math.sqrt(l)
pr... | import math
s = list(map(float,input().split()))
if(s[2] <= 12):
dig = (360 * (s[2] / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60
else:
dig = (360 * ((s[2] - 12) / 12) + 30 * (s[3] / 60)) - 360 * s[3] / 60
l = s[0] * s[0] + s[1] * s[1] - 2 * s[0] * s[1] * math.cos(math.radians(dig))
le = math.sqrt(l)
print(le) | [
"call.remove"
] | 398,900 | 398,901 | u741007505 | python |
p02677 | A,B,H,M=input().split()
A=int(A)
B=int(B)
H=int(H)
M=int(M)
kakudo_H = H*30 +M*0.5
kakudo_M = M*6
if M==0:
kakudo_M=360
kakudo_sa=abs(kakudo_H-kakudo_M)
# cはまずは2条している値としてセット
c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa)))
C=c**0.5
print(C) | import math
A,B,H,M=input().split()
A=int(A)
B=int(B)
H=int(H)
M=int(M)
kakudo_H = H*30 +M*0.5
kakudo_M = M*6
if M==0:
kakudo_M=360
kakudo_sa=abs(kakudo_H-kakudo_M)
# cはまずは2条している値としてセット
c=A**2 +B**2-2*A*B*(math.cos(math.radians(kakudo_sa)))
C=c**0.5
print(C) | [] | 398,902 | 398,903 | u674588203 | python |
p02677 | from math import cos, sqrt, radians
A, B, H, M = map(int, input().split())
Md = M * 6
Hd = (H * 30) + ((M/60) * 30)
Cd = (Hd - Md)
print(Cd)
As = A ** 2
Bs = B ** 2
D = 2 * A * B
X = sqrt(As + Bs - (D * cos(radians(Cd))))
print(X)
| from math import cos, sqrt, radians
A, B, H, M = map(int, input().split())
Md = M * 6
Hd = (H * 30) + ((M/60) * 30)
Cd = (Hd - Md)
As = A ** 2
Bs = B ** 2
D = 2 * A * B
X = sqrt(As + Bs - (D * cos(radians(Cd))))
print(X) | [
"call.remove"
] | 398,912 | 398,913 | u730747703 | python |
p02677 | from math import cos, sqrt, radians
A, B, H, M = map(int, input().split())
angle_a = 30 * H + 0.5 * M
angle_b = 6 * M
diff = abs(angle_a - angle_b)
if diff > 180:
diff = diff - 180
theta = radians(diff)
res = sqrt(A*A + B*B - 2 * A * B * cos(theta))
print(res) | from math import cos, sqrt, radians
A, B, H, M = map(int, input().split())
angle_a = 30 * H + 0.5 * M
angle_b = 6 * M
diff = abs(angle_a - angle_b)
if diff > 180:
diff = 360 - diff
theta = radians(diff)
res = sqrt(A*A + B*B - 2 * A * B * cos(theta))
print(res) | [
"expression.operation.binary.remove"
] | 398,914 | 398,915 | u586639900 | python |
p02677 | import math
a, b, h, m = list(map(int, input().split()))
needle = [h * 30 + m * 0.5, m * 6]
angle = max(needle) - min(needle)
print(angle)
if angle > 180.0:
angle = 360 -angle
c2 = math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(math.radians(angle))
print('{:.11f}'.format(math.sqrt(c2)))
| import math
a, b, h, m = list(map(int, input().split()))
needle = [h * 30 + m * 0.5, m * 6]
angle = max(needle) - min(needle)
if angle > 180.0:
angle = 360 - angle
c2 = math.pow(a, 2) + math.pow(b, 2) - 2 * a * b * math.cos(math.radians(angle))
print('{:.11f}'.format(math.sqrt(c2)))
| [
"call.remove"
] | 398,916 | 398,917 | u683116963 | python |
p02677 | import math
from decimal import Decimal as d
a,b,h,m=map(int,input().split())
tyousin=d((h+m/60)/6*math.pi)
tanshin=d(m/30*math.pi)
rad=abs(tyousin-tanshin)
print(rad)
x=a**2+b**2-2*a*b*math.cos(rad)
ans=d(math.sqrt(x))
print(abs(ans))
| import math
from decimal import Decimal as d
a,b,h,m=map(int,input().split())
tyousin=d((h+m/60)/6*math.pi)
tanshin=d(m/30*math.pi)
rad=abs(tyousin-tanshin)
x=a**2+b**2-2*a*b*math.cos(rad)
ans=d(math.sqrt(x))
print(abs(ans))
| [
"call.remove"
] | 398,918 | 398,919 | u608355135 | python |
p02677 | import math
def dosuu(h,m):
rad=abs((2*math.pi)*((6*m-(30*h+m/2))/360))
return rad
a,b,h,m=map(int,input().split())
kaku=dosuu(h,m)
print(kaku)
rad=math.cos(kaku)
long=(a**2+b**2-2*a*b*rad)**(1/2)
print(long) | import math
def dosuu(h,m):
rad=abs((2*math.pi)*((6*m-(30*h+m/2))/360))
return rad
a,b,h,m=map(int,input().split())
kaku=dosuu(h,m)
rad=math.cos(kaku)
long=(a**2+b**2-2*a*b*rad)**(1/2)
print(long) | [
"call.remove"
] | 398,920 | 398,921 | u927860986 | python |
p02677 | #C - : (Colon)
import math
A,B,H,M = map(int, input().split())
h = (H*60+M)*360/(12*60)
m = M*360/60
# h = H*30
# h = h + 0.5*M
# m = M*6
w = 0
w = h - m
if w > 180:
w = w-180
elif w == 180:
print(abs(A+B))
exit()
elif w == 0:
print(abs(A-B))
exit()
else:
pass
#print(h,m,w)
c = A**2+B**2-2*A*... | #C - : (Colon)
import math
A,B,H,M = map(int, input().split())
h = (H*60+M)*360/(12*60)
m = M*360/60
# h = H*30
# h = h + 0.5*M
# m = M*6
w = 0
w = h - m
if w > 180:
w = w
# elif w < 0:
# w = w+180
elif w == 180:
print(abs(A+B))
exit()
elif w == 0:
print(abs(A-B))
exit()
else:
pass
#print(... | [
"expression.operation.binary.remove"
] | 398,933 | 398,934 | u146575240 | python |
p02677 | import math
a,b,h,m = map(float, input().split())
s_theta = m * 6
l_theta = (h*60 + m)*0.5
if abs(s_theta - l_theta) > 180:
theta = abs(s_theta - l_theta) - 180
else:
theta = abs(s_theta - l_theta)
rad = math.radians(theta)
ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad))
print(ans) | import math
a,b,h,m = map(float, input().split())
s_theta = m * 6
l_theta = (h*60 + m)*0.5
if abs(s_theta - l_theta) > 180:
theta = 360 - abs(s_theta - l_theta)
else:
theta = abs(s_theta - l_theta)
rad = math.radians(theta)
ans = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad))
print(ans) | [
"expression.operation.binary.remove"
] | 398,954 | 398,955 | u051298937 | python |
p02677 | A, B, H, M = map(int,input().split())
import math
theta = min(abs(30*H-6*M),360-abs(30*H-6*M))
cos = math.cos(math.radians(theta))
d = math.sqrt(math.pow(A,2)+math.pow(B,2)-2*A*B*cos)
print(d) | A, B, H, M = map(int,input().split())
import math
theta = min(abs(30*H-5.5*M),360-abs(30*H-5.5*M))
cos = math.cos(math.radians(theta))
d = math.sqrt(math.pow(A,2)+math.pow(B,2)-2*A*B*cos)
print(d) | [
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 398,958 | 398,959 | u141190115 | python |
p02677 | import math
A, B, H, M = list(map(int, input().split()))
theta = abs(60 * M - (60 * H + M) / 2)
if theta > 180:
theta = 360 - theta
theta = abs(math.radians(theta))
ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta)
ans = math.sqrt(ans)
print(ans) | import math
A, B, H, M = list(map(int, input().split()))
theta = abs(6 * M - (60 * H + M) / 2)
if theta > 180:
theta = 360 - theta
theta = abs(math.radians(theta))
ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta)
ans = math.sqrt(ans)
print(ans)
| [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 398,982 | 398,983 | u533084327 | python |
p02677 | import math
A, B, H, M = list(map(int, input().split()))
theta = abs(60 * M - (60 * H + M) / 2)
if theta > 180:
theta = 360 - theta
theta = math.radians(theta)
ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta)
ans = math.sqrt(ans)
print(ans) | import math
A, B, H, M = list(map(int, input().split()))
theta = abs(6 * M - (60 * H + M) / 2)
if theta > 180:
theta = 360 - theta
theta = abs(math.radians(theta))
ans = A ** 2 + B ** 2 - 2 * A * B * math.cos(theta)
ans = math.sqrt(ans)
print(ans)
| [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change",
"call.add"
] | 398,984 | 398,983 | u533084327 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
cos = math.cos(math.radians((60*H + M)/2))
result = math.sqrt(A**2 + B**2 - 2*A*B*cos)
print(result) | import math
A, B, H, M = map(int, input().split())
cos = math.cos(math.radians((60*H - 11*M)/2))
result = math.sqrt(A**2 + B**2 - 2*A*B*cos)
print(result) | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 398,987 | 398,988 | u369796672 | python |
p02677 | a,b,h,m = map(int, input().split())
import math
zishin = 30 * h + 0.5 * m
tanshin = 6 * m
kakudo = abs(zishin - tanshin)
if kakudo >= 180:
kakudo = kakudo - 180
cos = math.cos(math.radians(kakudo))
dis = a ** 2 + b ** 2 - 2 * a * b * cos
print(math.sqrt(dis)) | a,b,h,m = map(int, input().split())
import math
zishin = 30 * h + 0.5 * m
tanshin = 6 * m
kakudo = abs(zishin - tanshin)
if kakudo >= 180:
kakudo = 360 - kakudo
cos = math.cos(math.radians(kakudo))
dis = a ** 2 + b ** 2 - 2 * a * b * cos
print(math.sqrt(dis)) | [
"expression.operation.binary.remove"
] | 398,989 | 398,990 | u573234244 | python |
p02677 | a,b,h,m = map(int, input().split())
import math
zishin = 30 * h + 0.5 * m
tanshin = 6 * m
kakudo = abs(zishin - tanshin)
if kakudo > 180:
kakudo = kakudo - 180
cos = math.cos(math.radians(kakudo))
dis = a ** 2 + b ** 2 - 2 * a * b * cos
print(math.sqrt(dis)) | a,b,h,m = map(int, input().split())
import math
zishin = 30 * h + 0.5 * m
tanshin = 6 * m
kakudo = abs(zishin - tanshin)
if kakudo >= 180:
kakudo = 360 - kakudo
cos = math.cos(math.radians(kakudo))
dis = a ** 2 + b ** 2 - 2 * a * b * cos
print(math.sqrt(dis)) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change",
"expression.operation.binary.remove"
] | 398,991 | 398,990 | u573234244 | python |
p02677 | A,B,H,M = map(int,input().split())
import math
d = 30*(H%12)+0.5*M -6*M
if d<0:
d = -d
if d>180:
d = 360 -d
print(d)
c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d))
print(math.sqrt(c)) | A,B,H,M = map(int,input().split())
import math
d = 30*(H%12)+0.5*M -6*M
if d<0:
d = -d
if d>180:
d = 360 -d
c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d))
print(math.sqrt(c)) | [
"call.remove"
] | 398,994 | 398,995 | u772029934 | python |
p02677 | A,B,H,M = map(int,input().split())
import math
d = 30*(H%12)+0.6*M -6*M
if d<0:
d = -d
if d>180:
d = 360 -d
c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d))
print(math.sqrt(c))
| A,B,H,M = map(int,input().split())
import math
d = 30*(H%12)+0.5*M -6*M
if d<0:
d = -d
if d>180:
d = 360 -d
c = A**2 + B**2 - 2*A*B*math.cos(math.radians(d))
print(math.sqrt(c)) | [
"literal.number.float.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 398,996 | 398,995 | u772029934 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
x=abs(round(30*H - 5.5*M))
cosx=math.cos(math.radians(x))
print(math.sqrt((A**2)+(B**2)-2*A*B*cosx))
| import math
A,B,H,M=map(int,input().split())
x=abs(30*H - 5.5*M)
cosx=math.cos(math.radians(x))
print(math.sqrt((A**2)+(B**2)-2*A*B*cosx))
| [
"call.arguments.change"
] | 399,002 | 399,003 | u194472175 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
minute = m * 360 / 60
hours = (h * 360 / 12)
hours += m * 360 / 720
angle = abs(minute - hours)
if angle > 180:
angle = 360 - angle
angle = math.radians(angle)
ans = math.sqrt((a**2) + (b**2) - (2*a*b*math.cos(angle)))
| import math
a, b, h, m = map(int, input().split())
minute = m * 360 / 60
hours = (h * 360 / 12)
hours += m * 360 / 720
angle = abs(minute - hours)
if angle > 180:
angle = 360 - angle
angle = math.radians(angle)
ans = math.sqrt((a**2) + (b**2) - (2*a*b*math.cos(angle)))
print(ans)
| [
"call.add"
] | 399,004 | 399,005 | u578930448 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
H_deg = H*(math.pi)/6+ M*math.pi/360
M_deg = M*(math.pi)/(3*10)
if H_deg >= M_deg:
deg = H_deg - M_deg
else:
deg = M_deg - H_deg
if deg >math.pi:
deg = deg-(math.pi)
c2=0
c2 = A*A+B*B-2*A*B*(math.cos(deg))
print(math.sqrt(c2))
| import math
A,B,H,M = map(int,input().split())
H_deg = H*(math.pi)/6+M*math.pi/360
M_deg = M*(math.pi)/(3*10)
if H_deg >= M_deg:
deg = H_deg - M_deg
else:
deg = M_deg - H_deg
if deg >math.pi:
deg = 2*(math.pi)-deg
c2=0
c2 = A*A+B*B-2*A*B*(math.cos(deg))
print(math.sqrt(c2)) | [
"assignment.change"
] | 399,008 | 399,009 | u516566941 | python |
p02677 | import numpy as np
import math
ABHM=np.array(input().split(" "),dtype=np.int32)
A=ABHM[0]
B=ABHM[1]
H=ABHM[2]
M=ABHM[3]
minutes=H*60+M
long_angle=6*minutes%360
small_angle=0.5*minutes%360
angle=0
if(long_angle>small_angle):
angle=long_angle-small_angle
else:
angle=small_angle-long_angle
if(angle==180):
... | import numpy as np
import math
ABHM=np.array(input().split(" "),dtype=np.int32)
A=ABHM[0]
B=ABHM[1]
H=ABHM[2]
M=ABHM[3]
minutes=H*60+M
long_angle=6*minutes%360
small_angle=0.5*minutes%360
angle=0
if(long_angle>small_angle):
angle=long_angle-small_angle
else:
angle=small_angle-long_angle
if(angle==180):
... | [
"expression.operation.binary.remove"
] | 399,032 | 399,033 | u407891541 | python |
p02677 | import numpy as np
import math
ABHM=np.array(input().split(" "),dtype=np.int32)
A=ABHM[0]
B=ABHM[1]
H=ABHM[2]
M=ABHM[3]
minutes=H*60+M
long_angle=6*minutes%360
small_angle=0.5*minutes%360
angle=0
if(long_angle>small_angle):
angle=long_angle-small_angle
else:
angle=small_angle-long_angle
if(angle==180):
... | import numpy as np
import math
ABHM=np.array(input().split(" "),dtype=np.int32)
A=ABHM[0]
B=ABHM[1]
H=ABHM[2]
M=ABHM[3]
minutes=H*60+M
long_angle=6*minutes%360
small_angle=0.5*minutes%360
angle=0
if(long_angle>small_angle):
angle=long_angle-small_angle
else:
angle=small_angle-long_angle
if(angle==180):
... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change",
"expression.operation.binary.remove"
] | 399,034 | 399,033 | u407891541 | python |
p02677 | import math
tempList = tuple(map(int, input().split()))
a = tempList[0]
b = tempList[1]
hour = tempList[2]
minute = tempList[3]
time = hour * 60 + minute
mypi = math.pi
hourAngle = time/(12*60)
minuteAngle = minute/60
diff = math.fabs(hourAngle - minute)
if diff > 0.5:
diff = 1 - diff
angle = diff * mypi * 2
result... | import math
tempList = tuple(map(int, input().split()))
a = tempList[0]
b = tempList[1]
hour = tempList[2]
minute = tempList[3]
time = hour * 60 + minute
mypi = math.pi
hourAngle = time/(12*60)
minuteAngle = minute/60
diff = abs(hourAngle - minuteAngle)
if diff > 0.5:
diff = 1 - diff
angle = diff * mypi * 2
result ... | [
"assignment.value.change",
"identifier.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,051 | 399,052 | u016163861 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
if 30*H-6*M>=0:
y=abs(30*H-6*M)+M//2
else:
y=abs(30*H-6*M)-M//2
if y==90 or y==270:
ans=(A**2+B**2)**(0.5)
else:
ans=(A**2+B**2-2*A*B*math.cos(math.radians(y)))**(0.5)
print(ans)
| import math
A,B,H,M=map(int,input().split())
if 30*H-6*M>=0:
y=abs(30*H-6*M)+M/2
else:
y=abs(30*H-6*M)-M/2
if y==90 or y==270:
ans=(A**2+B**2)**(0.5)
else:
ans=(A**2+B**2-2*A*B*math.cos(math.radians(y)))**(0.5)
print(ans)
| [
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,075 | 399,076 | u257265865 | python |
p02677 | import math
N = input().split(" ")
A = int(N[0])
B = int(N[1])
H = int(N[2])
M = int(N[3])
naga = (30 * H) + (M / 2)
mizi = 6 * M
if naga < mizi:
deg = mizi - naga
elif naga > mizi:
deg = naga - mizi
if deg > 180:
deg = 360 - deg
s = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(deg)))
s = s**(1/2... | import math
N = input().split(" ")
A = int(N[0])
B = int(N[1])
H = int(N[2])
M = int(N[3])
naga = (30 * H) + (M / 2)
mizi = 6 * M
if naga < mizi:
deg = mizi - naga
elif naga >= mizi:
deg = naga - mizi
if deg >= 180:
deg = 360 - deg
s = (A ** 2) + (B ** 2) - (2 * A * B * math.cos(math.radians(deg)))
s = s**(1... | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 399,077 | 399,078 | u935089856 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
theta1 = (60*h + m) / 2.0;
theta2 = 6.0 * m;
theta = abs(theta1 - theta2);
if theta > 180:
theta -= 180;
c = math.cos(theta / 180 * math.acos(-1));
ans = a*a + b*b - 2*a*b*c;
ans = math.sqrt(ans);
print(ans); | import math
a, b, h, m = map(int, input().split())
theta1 = (60*h + m) / 2.0;
theta2 = 6.0 * m;
theta = abs(theta1 - theta2);
if theta > 180:
theta = 360 - theta;
c = math.cos(theta / 180 * math.acos(-1));
ans = a*a + b*b - 2*a*b*c;
ans = math.sqrt(ans);
print(ans); | [
"assignment.change"
] | 399,079 | 399,080 | u103557284 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+int(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+int(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+int(M/2)-6*M)))
break
b=min(a,c)
print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+(M/2)-6*M)))
break
b=min(a,c)
print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | [
"control_flow.branch.if.condition.change",
"call.arguments.change"
] | 399,081 | 399,082 | u172966990 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+int(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+int(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+int(M/2)-6*M)))
break
b=min(a,c)
print("{:.12f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+(M/2)-6*M)))
break
b=min(a,c)
print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | [
"control_flow.branch.if.condition.change",
"call.arguments.change",
"literal.string.change",
"io.output.change"
] | 399,083 | 399,082 | u172966990 | python |
p02677 | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+int(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+int(M/2)-6*M))
c=abs(180-abs(360*i-abs(30*H+int(M/2)-6*M)))
break
b=min(a,c)
print("{:.12f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | import math
A,B,H,M=map(int,input().split())
for i in range(10):
if 0<=abs(360*i-abs(30*H+(M/2)-6*M))<360:
a=abs(360*i-abs(30*H+(M/2)-6*M))
c=abs(360-abs(360*i-abs(30*H+(M/2)-6*M)))
break
b=min(a,c)
print("{:.9f}".format(((A**2+B**2-2*A*B*(math.cos(b*(math.pi/180))))**(1/2)))) | [
"control_flow.branch.if.condition.change",
"call.arguments.change",
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"literal.string.change",
"io.output.change"
] | 399,084 | 399,082 | u172966990 | python |
p02677 | a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) < math.pi:
s = abs(alp-be)
else:
s = math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) <= math.pi:
s = abs(alp-be)
else:
s = 2*math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | [
"expression.operator.compare.change",
"control_flow.branch.if.condition.change"
] | 399,085 | 399,086 | u328179275 | python |
p02677 | a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) <= math.pi:
s = abs(alp-be)
else:
s = math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | a,b,h,m = map(int,input().split())
import math
alp = 0.5*(h*60+m)/180*math.pi
be = 6*m/180*math.pi
if abs(alp-be) <= math.pi:
s = abs(alp-be)
else:
s = 2*math.pi - abs(alp-be)
l = (a**2+b**2 - 2*a*b*math.cos(s))**(1/2)
print(l) | [
"assignment.change"
] | 399,087 | 399,086 | u328179275 | python |
p02677 | import math
num = input()
num_list = num.split()
min_time = int(num_list[2]) * 60 + int(num_list[3])
hour_arg = min_time * 0.5
min_arg = int(num_list[3]) * 6
arg = abs(hour_arg - min_arg)
if arg == 0:
answer = 0
if arg > 180:
arg = 360 - arg
answer = pow(int(num_list[0]), 2) + pow(int(num_list[1]), 2) + (int(num... | import math
num = input()
num_list = num.split()
min_time = int(num_list[2]) * 60 + int(num_list[3])
hour_arg = min_time * 0.5
min_arg = int(num_list[3]) * 6
arg = abs(hour_arg - min_arg)
if arg == 0:
answer = 0
if arg > 180:
arg = 360 - arg
answer = pow(int(num_list[0]), 2) + pow(int(num_list[1]), 2) - (int(num_... | [
"misc.opposites",
"expression.operator.arithmetic.change",
"assignment.value.change",
"expression.operation.binary.change"
] | 399,088 | 399,089 | u948165355 | python |
p02677 | import math
A,B,H,M=(int(x) for x in input().split())
rShort = (H*30)+M*0.5
rLong = M*60
ang=abs(rLong-rShort)
ang=min(ang,360-ang)
ans=A*A+B*B-2*A*B*math.cos(math.radians(ang))
print(math.sqrt(ans)) | import math
A,B,H,M=(int(x) for x in input().split())
rShort = H*30+M*0.5
rLong = M*6
ang=abs(rLong-rShort)
ang=min(ang,abs(360-ang))
ans=A*A+B*B-2*A*B*math.cos(math.radians(ang))
print(math.sqrt(ans)) | [
"literal.number.integer.change",
"assignment.value.change",
"expression.operation.binary.change",
"call.add",
"call.arguments.change"
] | 399,127 | 399,128 | u540746268 | python |
p02677 | import math
a,b,h,m=map(int,input().split())
a_deg=h*30
b_deg=m*6
deg=math.radians(abs(b_deg-a_deg))
print(math.sqrt(a**2+b**2-2*a*b*math.cos(deg))) | import math
a,b,h,m=map(int,input().split())
a_deg=h*30+m*0.5
b_deg=m*6
deg=math.radians(abs(b_deg-a_deg))
print(math.sqrt(a**2+b**2-2*a*b*math.cos(deg)))
| [
"assignment.change"
] | 399,129 | 399,130 | u723554767 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
omega_h = 360 / (12*60)
omega_m = 360 / 60
min_sum_h = (H*60 + M) * omega_h
min_sum_h = min_sum_h % 360
min_sum_m = M * omega_m
if min_sum_h - min_sum_m > 180:
omega = 360 - (min_sum_h - min_sum_m)
else:
omega = min_sum_h - min_sum_m
cos_omega = math.cos(math.ra... | import math
A,B,H,M = map(int,input().split())
omega_h = 360 / (12*60)
omega_m = 360 / 60
min_sum_h = (H*60 + M) * omega_h
min_sum_h = min_sum_h % 360
min_sum_m = M * omega_m
if min_sum_h - min_sum_m > 180:
omega = 360 - (min_sum_h - min_sum_m)
else:
omega = min_sum_h - min_sum_m
cos_omega = math.cos(math.ra... | [
"assignment.value.change",
"identifier.replace.add",
"literal.replace.remove",
"expression.operation.binary.change"
] | 399,131 | 399,132 | u838959206 | python |
p02677 | import math
a,b,h,m = input().split()
a = int(a)
b = int(b)
h = int(h)
m = int(m)
deg = abs(30*h - 6*m)
ans2 = a**2+b**2-2*a*b*math.cos(math.radians(deg))
print(math.sqrt(ans2)) | import math
a,b,h,m = input().split()
a = int(a)
b = int(b)
h = int(h)
m = int(m)
deg = abs(30*h + 0.5*m - 6*m)
ans2 = a**2+b**2-2*a*b*math.cos(math.radians(deg))
print(math.sqrt(ans2)) | [
"assignment.change"
] | 399,136 | 399,137 | u605253462 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
h_kaku = 30 * h
m_kaku = 6 * m
sa_kaku = h_kaku - m_kaku if h_kaku >= m_kaku else m_kaku - h_kaku
if sa_kaku > 180:
sa_kaku = 360 - sa_kaku
if sa_kaku == 180:
ans = a+ b
elif sa_kaku == 0:
if a >= b:
ans = a-b
else:
ans = b-a
else:
... | import math
a, b, h, m = map(int, input().split())
h_kaku = 30 * h + (m / 2)
m_kaku = 6 * m
sa_kaku = h_kaku - m_kaku if h_kaku >= m_kaku else m_kaku - h_kaku
if sa_kaku > 180:
sa_kaku = 360 - sa_kaku
if sa_kaku == 180:
ans = a + b
elif sa_kaku == 0:
if a >= b:
ans = a - b
else:
ans ... | [
"assignment.change"
] | 399,140 | 399,141 | u289102924 | python |
p02677 | import math
A, B, H, M = map(int, input().split())
h_d = 30 * H + M / 2
m_d = 6 * M
if h_d >= m_d:
D = h_d - m_d
else:
D = m_d - h_d
if D > 180:
D -= 180
if D == 0:
ans = abs(B - A)
elif D == 180:
ans = B + A
else:
ans_sq = A*A + B*B - 2*A*B*math.cos(math.radians(D))
ans = math.sqrt(ans_... | import math
A, B, H, M = map(int, input().split())
h_d = 30 * H + M / 2
m_d = 6 * M
if h_d >= m_d:
D = h_d - m_d
else:
D = m_d - h_d
if D > 180:
D = 360 - D
if D == 0:
ans = abs(B - A)
elif D == 180:
ans = B + A
else:
ans_sq = A*A + B*B - 2*A*B*math.cos(math.radians(D))
ans = math.sqrt(a... | [
"assignment.add"
] | 399,144 | 399,145 | u084491185 | python |
p02677 | import numpy as np
import math
A, B, H, M = map(int, input().split())
#K = int(input())
#S = input()
def yogen_teiri(A, B, ang):
lenAB = np.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(ang)))
return lenAB
angA = H*30
angB = M*6
if angA > angB:
angAB = min(angA-angB, 360-(angA-angB))
lenAB = yogen_... | import numpy as np
import math
A, B, H, M = map(int, input().split())
#K = int(input())
#S = input()
def yogen_teiri(A, B, ang):
lenAB = np.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(ang)))
return lenAB
angA = H*30+M*0.5
angB = M*6
if angA > angB:
angAB = min(angA-angB, 360-(angA-angB))
lenAB = ... | [
"assignment.change"
] | 399,150 | 399,151 | u461463382 | python |
p02677 | import math
a, b, h, m = map(int, input().split())
ang_a = h/12
ang_b = m/60
ang = ang_a - ang_b if ang_a - ang_b <= 0.5 else ang_b - ang_a
theta = ang * 2 * math.pi
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))) | import math
a, b, h, m = map(int, input().split())
ang_a = (h+m/60)/12
ang_b = m/60
ang = ang_a - ang_b if ang_a - ang_b <= 0.5 else ang_b - ang_a
theta = ang * 2 * math.pi
print(math.sqrt(a**2 + b**2 - 2*a*b*math.cos(theta))) | [] | 399,154 | 399,155 | u659481093 | python |
p02677 | A,B,H,M=map(int,input().split())
import math
if abs(H*30+M*0.5-M*6)<=180:
C=A**2+B**2-2*A*B*math.cos(math.radians(abs(H*30+M*0.5-M*6)))
print(math.sqrt(C))
else:
C=A**2+B**2-2*A*B*math.cos(math.radians((180-abs(H*30+M*0.5-M*6))))
print(math.sqrt(C)) | A,B,H,M=map(int,input().split())
import math
if abs(H*30+M*0.5-M*6)<=180:
C=A**2+B**2-2*A*B*math.cos(math.radians(abs(H*30+M*0.5-M*6)))
print(math.sqrt(C))
else:
C=A**2+B**2-2*A*B*math.cos(math.radians((360-abs(H*30+M*0.5-M*6))))
print(math.sqrt(C)) | [
"literal.number.integer.change",
"assignment.value.change",
"call.arguments.change",
"expression.operation.binary.change"
] | 399,160 | 399,161 | u519922200 | python |
p02677 | import math
def readInt():
return list(map(int, input().split()))
a,b,h,m = readInt()
# print(a)
arg_h = 30*h + 30*(m/60)
arg_m = 6*m
if abs(arg_h-arg_m) < 180:
arg = math.radians(abs(arg_h-arg_m))
ans = (a**2+b**2-2*a*b*math.cos(arg))**(1/2)
elif abs(arg_h-arg_m) == 180:
ans = a+b
else:
arg = math.... | import math
def readInt():
return list(map(int, input().split()))
a,b,h,m = readInt()
# print(a)
arg_h = 30*h + 30*(m/60)
arg_m = 6*m
if abs(arg_h-arg_m) < 180:
arg = math.radians(abs(arg_h-arg_m))
ans = (a**2+b**2-2*a*b*math.cos(arg))**(1/2)
elif abs(arg_h-arg_m) == 180:
ans = a+b
else:
arg = math.... | [
"expression.operation.binary.remove"
] | 399,166 | 399,167 | u945157177 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
print(comp)
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
print(math.sqrt(ans)) | import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
print(math.sqrt(ans)) | [
"call.remove"
] | 399,170 | 399,171 | u708556844 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
print(comp)
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
print(math.sqrt(ans))
| import math
A,B,H,M = map(int,input().split())
H = H*5 + (5/60)*M
comp = abs(H-M)
if(comp>=30):
comp = 60-comp
pre = ((comp*6)/360)*2*math.pi
ans = A*A + B*B -2*A*B*math.cos(pre)
print(math.sqrt(ans)) | [
"call.remove"
] | 399,172 | 399,171 | u708556844 | python |
p02677 | import math
A,B,H,M = map(int,input().split())
w_long = 0.5
w_short = 6
minute = H * 60 + M
R_long = minute * w_long
R_short = M * w_short
R = abs(R_long-R_short)
if R == 0 or R == 360:
print(abs(A-B))
elif R == 180:
print(A+B)
cosR = math.cos(math.radians(R))
ans2 = A**2 + B**2 - 2*A*B*cosR
print(m... | import math
A,B,H,M = map(int,input().split())
w_long = 0.5
w_short = 6
minute = H * 60 + M
R_long = minute * w_long
R_short = M * w_short
R = abs(R_long-R_short)
if R == 0 or R == 360:
print(abs(A-B))
elif R == 180:
print(A+B)
else:
cosR = math.cos(math.radians(R))
ans2 = A**2 + B**2 - 2*A*B*co... | [] | 399,181 | 399,182 | u418381221 | python |
p02677 | import math
a,b,h,m = map(int,input().split())
a_rad=h*30+0.5*m
b_rad=m*6
ABSS=abs(a_rad-b_rad)
D=math.radians(ABSS)
print(D)
ans=math.sqrt(a**2+b**2-2*a*b*math.cos(D))
print(ans) | import math
a,b,h,m = map(int,input().split())
a_rad=h*30+0.5*m
b_rad=m*6
ABSS=abs(a_rad-b_rad)
D=math.radians(ABSS)
#print(D)
ans=math.sqrt(a**2+b**2-2*a*b*math.cos(D))
print(ans) | [
"call.remove"
] | 399,199 | 399,200 | u846385882 | python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.