Datasets:

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()) arg = math.radians(((h*60+m)*360/(12*60))-((m*360)/60)) dist=math.sqrt(a**2+b**2-2*a*b*abs(math.cos(arg))) print(dist)
import math a ,b, h, m = map(int, input().split()) arg = math.radians(((h*60+m)*360/(12*60))-((m*360)/60)) dist=math.sqrt(a**2+b**2-2*a*b*math.cos(arg)) print(dist)
[ "call.remove", "call.arguments.change" ]
397,302
397,303
u962175226
python
p02677
import math a,b,h,m=map(int,input().split()) def kakudo(h,m): jikan=30*h+0.5*m fun=60*m k=min(abs(jikan-fun),360-abs(jikan-fun)) k=k*math.pi/180 return k def cal(k): c=a**2+b**2-2*a*b*math.cos(k) return c**0.5 ans=cal(kakudo(h,m)) print(ans)
import math a,b,h,m=map(int,input().split()) def kakudo(hour,mini): jikan=30*hour+0.5*mini fun=6*mini k=min(abs(jikan-fun),360-abs(jikan-fun)) k=k*math.pi/180 return k def cal(k): c=a**2+b**2-2*a*b*math.cos(k) return c**0.5 ans=cal(kakudo(h,m)) print(ans)
[ "identifier.change", "assignment.value.change", "expression.operation.binary.change", "literal.number.integer.change" ]
397,315
397,316
u723583932
python
p02677
import math as mt A,B,H,M = map(int, input().split()) if abs(30*H+0.5*M-6*M) >= 180: d = abs(30*H+0.5*M-6*M) - 180 else: d = abs(30*H+0.5*M-6*M) ans = mt.sqrt(A**2+B**2-2*A*B*mt.cos(mt.radians(d))) print(ans)
import math as mt A,B,H,M = map(int, input().split()) if abs(30*H+0.5*M-6*M) >= 180: d = 360 - abs(30*H+0.5*M-6*M) else: d = abs(30*H+0.5*M-6*M) ans = mt.sqrt(A**2+B**2-2*A*B*mt.cos(mt.radians(d))) print(ans)
[ "expression.operation.binary.remove" ]
397,329
397,330
u279810362
python
p02677
from math import cos from math import radians a,b,h,m=map(int,input().split()) alpha=5/2*(h*60+m) beta=6*m n=radians(min(abs(alpha-beta),360-abs(alpha-beta))) ans=(a**2+b**2-2*a*b*cos(n))**(1/2) print(ans)
from math import cos from math import radians a,b,h,m=map(int,input().split()) alpha=(h*60+m)/2 beta=6*m n=radians(min(abs(alpha-beta),360-abs(alpha-beta))) ans=(a**2+b**2-2*a*b*cos(n))**(1/2) print(ans)
[ "expression.operation.binary.remove" ]
397,333
397,334
u962330718
python
p02677
import math A, B, H, M = map(int, input().split()) deg_long = M * 6 deg_short = 30 * H + M / 2 if abs(deg_long - deg_short) > 180: rad = math.radians(360 - abs(deg_long - deg_short)) else: math.radians(abs(deg_long - deg_short)) print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(rad)))
import math A, B, H, M = map(int, input().split()) rad = 0 deg_long = M * 6 deg_short = 30 * H + M / 2 if abs(deg_long - deg_short) > 180: rad = math.radians(360 - abs(deg_long - deg_short)) else: rad = math.radians(abs(deg_long - deg_short)) print(math.sqrt(A ** 2 + B ** 2 - 2 * A * B * math.cos(rad)))
[ "assignment.add" ]
397,337
397,338
u857555436
python
p02677
import math A, B, H, M = map(int, input().split()) deg_long = M * 6 deg_short = 30 * H + M / 2 rad = math.radians( min(deg_long - deg_short, 360-(deg_long-deg_short))) print( math.sqrt(A **2 + B ** 2 - 2*A*B*cos(rad)) )
import math A, B, H, M = map(int, input().split()) deg_long = M * 6 deg_short = 30 * H + M / 2 rad = math.radians( min(deg_long - deg_short, 360-(deg_long-deg_short))) print( math.sqrt(A **2 + B ** 2 - 2* A * B* math.cos(rad)) )
[]
397,339
397,340
u145838785
python
p02677
import math a,b,h,m = map(int,input().split()) print(a**2+b**2-2*a*b*math.cos(math.radians(h*30 - m*5.5)))**0.5
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-2*a*b*math.cos(math.radians(h*30 - m*5.5)))**0.5)
[ "call.arguments.change" ]
397,351
397,352
u602677143
python
p02677
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-2*a*b*math.cos(math.radians(h*30 - m*5.5))))**0.5
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-2*a*b*math.cos(math.radians(h*30 - m*5.5)))**0.5)
[ "call.arguments.change" ]
397,353
397,352
u602677143
python
p02677
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-(2*a*b*math.cos(math.radians(h*30 - m*6))))**0.5)#
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-2*a*b*math.cos(math.radians(h*30 - m*5.5)))**0.5)
[ "call.arguments.change", "expression.operation.binary.change" ]
397,354
397,352
u602677143
python
p02677
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-(2*a*b*math.cos(math.radians(h*30 - m*6))))**0.5)#
import math a,b,h,m = map(int,input().split()) print((a**2+b**2-(2*a*b*math.cos(math.radians(h*30 - m*5.5))))**0.5)
[ "call.arguments.change", "expression.operation.binary.change" ]
397,354
397,355
u602677143
python
p02677
import math A,B,H,M = map(int, input().split()) X = H*30+M*0.5 Y = M*6 if -180 < X - Y < 0: Z = Y - X elif X - Y <= -180: Z = 360 -(Y - X) elif 180 > X - Y >= 0: z = X - Y elif X - Y >= 180: z = 360-(X - Y) ans = A*A+B*B-2*A*B*math.cos(math.radians(z)) ANS = math.sqrt(ans) print(ANS)
import math A,B,H,M = map(int, input().split()) X = H*30+M*0.5 Y = M*6 if -180 < X - Y < 0: z = Y - X elif X - Y <= -180: z = 360 -(Y - X) elif 180 > X - Y >= 0: z = X - Y elif X - Y >= 180: z = 360-(X - Y) ans = A*A+B*B-2*A*B*math.cos(math.radians(z)) ANS = math.sqrt(ans) print(ANS)
[ "assignment.variable.change", "identifier.change" ]
397,361
397,362
u829416877
python
p02677
import math a, b, h, m = map(int, input().split()) angle = 30*h - 6*m if(angle >= 180): angle = 360 - angle print((a**2+b**2-(2*a*b*math.cos(math.radians(angle))))**0.5)
import math a, b, h, m = map(int, input().split()) angle = 30*h - 5.5*m if(angle >= 180): angle = 360 - angle print((a**2+b**2-(2*a*b*math.cos(math.radians(angle))))**0.5)
[ "assignment.value.change", "expression.operation.binary.change" ]
397,367
397,368
u583276018
python
p02677
import math A,B,H,M = int(input().split()) Ad = H * 30 + M * 0.5 Bd = M * 6 difAB = abs(Ad - Bd) if difAB >=180: difAB = 360-difAB print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(difAB))))
import math A,B,H,M = map(int,input().split()) Ad = H * 30 + M * 0.5 Bd = M * 6 difAB = abs(Ad - Bd) if difAB >=180: difAB = 360-difAB print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(difAB))))
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.add" ]
397,374
397,375
u357403505
python
p02677
import math A,B,H,M = map(int,input().split()) AX = A * math.cos(2*math.pi*(H/12.+M/12./60.)) AY = A * math.sin(2*math.pi*(H/12.+M/12./60.)) BX = B * math.cos(2*math.pi*M/60.) BY = B * math.sin(2*math.pi*M/60.2) ans = math.sqrt((AX-BX)**2+(AY-BY)**2) print(ans)
import math A,B,H,M = map(int,input().split()) AX = A * math.cos(2*math.pi*(H/12.+M/12./60.)) AY = A * math.sin(2*math.pi*(H/12.+M/12./60.)) BX = B * math.cos(2*math.pi*M/60.) BY = B * math.sin(2*math.pi*M/60.) ans = math.sqrt((AX-BX)**2+(AY-BY)**2) print(ans)
[ "literal.number.float.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change", "literal.integer.replace.remove", "literal.float.replace.add" ]
397,381
397,382
u582415761
python
p02677
from math import pi, fabs, cos, sqrt a, b, h, m = (int(s) for s in input().split()) theta_a = 2*pi * h/12 theta_b = 2*pi * m/60 theta = fabs(theta_a - theta_b) if theta > pi/2: theta = 2 * pi - theta result = sqrt(a**2 + b**2 - 2*a*b*cos(theta)) print(result)
from math import pi, fabs, cos, sqrt a, b, h, m = (int(s) for s in input().split()) theta_a = 2*pi * (m/60 + h)/12 theta_b = 2*pi * m/60 theta = fabs(theta_a - theta_b) if theta > pi/2: theta = 2 * pi - theta result = sqrt(a**2 + b**2 - 2*a*b*cos(theta)) print(result)
[]
397,390
397,391
u714410759
python
p02677
A, B, H, M = map(int,input().split()) Ha = H*math.pi/6 + M*math.pi/360 Ma = M*math.pi/30 if Ha == Ma: print(abs(A-B)) else: print(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(Ha-Ma)))
import math A, B, H, M = map(int,input().split()) Ha = H*math.pi/6 + M*math.pi/360 Ma = M*math.pi/30 if Ha == Ma: print(abs(A-B)) else: print(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(Ha-Ma)))
[]
397,392
397,393
u152638361
python
p02677
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 4*M L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 11*M/2 L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
397,394
397,395
u051613269
python
p02677
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 143*M/24 L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 11*M/2 L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
397,396
397,395
u051613269
python
p02677
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 6*M L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 11*M/2 L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
397,397
397,395
u051613269
python
p02677
import math A,B,H,M = list(map(int,input().split())) Q = abs(30*H - 6*M) L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
import math A,B,H,M = list(map(int,input().split())) Q = 30*H - 11*M/2 L = (A**2 + B**2 - 2*A*B*math.cos(math.radians(Q)))**(1/2) print(L)
[ "call.remove", "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,398
397,395
u051613269
python
p02677
import math A, B, H, M = map(int,input().split()) timeHr = H + (M / 60) angVelA = (1/6) * 180 angVelB = (2) * 180 degA = (angVelA * timeHr) % (2 * 180) degB = (angVelB * timeHr) % (2 * 180) degDiff = abs(degB - degA) % 180 disX_2 = math.pow(B, 2) + math.pow(A, 2) - (2 * A * B * math.cos(math.radians(degDiff))) di...
import math A, B, H, M = map(int,input().split()) timeHr = H + (M / 60) angVelA = (1/6) * 180 angVelB = (2) * 180 degA = (angVelA * timeHr) % (2 * 180) degB = (angVelB * timeHr) % (2 * 180) degDiff = abs(degB - degA) disX_2 = math.pow(B, 2) + math.pow(A, 2) - (2 * A * B * math.cos(math.radians(degDiff))) disX = ...
[ "expression.operation.binary.remove" ]
397,399
397,400
u660899380
python
p02677
import math A, B, H, M = map(int,input().split()) timeHr = H + (M / 60) angVelA = (1/6) * 180 angVelB = (2) * 180 degA = (angVelA * timeHr) degB = (angVelB * timeHr) defDiff = math.radians(abs(degB - degA)) disX_2 = math.pow(B, 2) + math.pow(A, 2) - (2 * A * B * math.cos(degDiff)) disX = math.sqrt(disX_2) print(...
import math A, B, H, M = map(int,input().split()) timeHr = H + (M / 60) angVelA = (1/6) * 180 angVelB = (2) * 180 degA = (angVelA * timeHr) degB = (angVelB * timeHr) degDiff = math.radians(abs(degB - degA)) disX_2 = math.pow(B, 2) + math.pow(A, 2) - (2 * A * B * math.cos(degDiff)) disX = math.sqrt(disX_2) print(...
[ "assignment.variable.change", "identifier.change" ]
397,401
397,402
u660899380
python
p02677
import math l = list(map(int, input().split())) A = l[0] B = l[1] H = l[2] M = l[3] thita1 = 6*M - 30*(H + M/60) thita2 = 6*M thita = abs(thita1 - thita2) thita_ = max(thita, 360-thita) c = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(thita_))) print(c)
import math l = list(map(int, input().split())) A = l[0] B = l[1] H = l[2] M = l[3] thita1 = 30*(H + M/60) thita2 = 6*M thita = abs(thita1 - thita2) thita_ = max(thita, 360-thita) c = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(thita_))) print(c)
[ "expression.operation.binary.remove" ]
397,405
397,406
u593346450
python
p02677
import math A, B, H, M = map(int, input().split()) degree = abs(6 * M - 30 * H) if degree > 180: degree = 360 - degree print(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(degree))))
import math A, B, H, M = map(int, input().split()) degree = abs(6 * M - 30 * (H+M/60)) if degree > 180: degree = 360 - degree print(math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(degree))))
[ "call.arguments.change" ]
397,415
397,416
u068727970
python
p02677
import math a,b,h,m = map(int,input().split()) w = h/6-11*m/360 u = 2*a*b*math.cos(math.radians(w)) dis = a*a + b*b -u print(math.sqrt(dis))
import math a,b,h,m = map(int,input().split()) w = 30*h-11*m/2 u = 2*a*b*math.cos(math.radians(w)) dis = a*a + b*b -u print(math.sqrt(dis))
[ "expression.operation.binary.remove", "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
397,419
397,420
u726984689
python
p02677
import math A, B, H, M = map(int, input().split()) theta = abs(H*30 - M*5.5) / 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()) theta = abs(H*30 - M*5.5) ans = math.sqrt(A*A + B*B - 2*A*B*math.cos(math.radians(theta))) print(ans)
[ "expression.operation.binary.remove" ]
397,426
397,427
u239725287
python
p02677
import math A, B, H, M = map(int, input().split()) theta = abs(H*30 - M*5.5) % 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()) theta = abs(H*30 - M*5.5) ans = math.sqrt(A*A + B*B - 2*A*B*math.cos(math.radians(theta))) print(ans)
[ "expression.operation.binary.remove" ]
397,428
397,427
u239725287
python
p02677
import math A,B,H,M=map(int,input().split()) rad=abs(math.pi/6*H-math.pi/30*M) print((A**2+B**2-2*A*B*math.cos(rad))**0.5)
import math A,B,H,M=map(int,input().split()) rad=abs(math.pi/6*(H+M/60)-math.pi/30*M) print((A**2+B**2-2*A*B*math.cos(rad))**0.5)
[ "call.arguments.change" ]
397,431
397,432
u774056921
python
p02677
a,b,c,d = map(int,input().split()) import math rad = math.fabs((c/12 - d/60)*360) rad = min(rad,360-rad)/180 cosine = math.cos(rad*3.141593653589793) print((a**2+b**2 - 2*a*b*cosine)**0.5)
a,b,c,d = map(int,input().split()) import math rad = math.fabs((c/12 - d/60 + d/720)*360) rad = min(rad,360-rad)/180 cosine = math.cos(rad*math.pi) print((a**2+b**2 - 2*a*b*cosine)**0.5)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "expression.operation.binary.change" ]
397,433
397,434
u842028864
python
p02677
import math hourR, minR, H, M = map(int, input().split()) hourPos = [math.sin(2 * ((H * 60 + M) / 1440) * math.pi) * hourR, math.cos(2 * ((H * 60 + M) / 1440) * math.pi) * hourR] minPos = [math.sin((M / 30) * math.pi) * minR, math.cos((M / 30) * math.pi) * minR] distance = math.sqrt( pow(hourPo...
import math hourR, minR, H, M = map(int, input().split()) hourPos = [math.sin(((H * 60 + M) / 360) * math.pi) * hourR, math.cos(((H * 60 + M) / 360) * math.pi) * hourR] minPos = [math.sin((M / 30) * math.pi) * minR, math.cos((M / 30) * math.pi) * minR] distance = math.sqrt( pow(hourPos[0] - min...
[ "expression.operation.binary.remove", "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,435
397,436
u581022379
python
p02677
import math s = list(map(float, input().split())) htheta = 30.0*s[2]+0.5*(s[3]) #hの角度 mtheta = 6.0*(s[3]) #mの角度 theta = abs(htheta-mtheta) if theta > 180: theta = theta - 180 r = math.sqrt(s[0]**2+s[1]**2-2*s[0]*s[1]*math.cos(math.radians(theta))) print(r)
import math s = list(map(float, input().split())) htheta = 30.0*s[2]+0.5*(s[3]) #hの角度 mtheta = 6.0*(s[3]) #mの角度 theta = abs(htheta-mtheta) if theta > 180: theta = 360 - theta r = math.sqrt(s[0]**2+s[1]**2-2*s[0]*s[1]*math.cos(math.radians(theta))) print(r)
[ "expression.operation.binary.remove" ]
397,439
397,440
u933751828
python
p02677
import math # 時針の速度 # 360度/720分 = 1/2度/m # 分針の速度 # 360度/60分 = 6度/m # 時針と分針の度数は両者を減算したものの絶対値 # 使用するのは余弦定理 # def str_to_int(str_num): # int_num = int(str_num) # return int_num line = input().split(' ') # int_line = list(map(lambda str_num: int(str_num), line)) int_line = [int(str_num) for str_num in line] prin...
import math # 時針の速度 # 360度/720分 = 1/2度/m # 分針の速度 # 360度/60分 = 6度/m # 時針と分針の度数は両者を減算したものの絶対値 # 使用するのは余弦定理 # def str_to_int(str_num): # int_num = int(str_num) # return int_num line = input().split(' ') # int_line = list(map(lambda str_num: int(str_num), line)) int_line = [int(str_num) for str_num in line] # pr...
[ "call.remove" ]
397,445
397,446
u492691435
python
p02677
import math A, B, H, M = map(int, input().split()) h_angle = 360 / 12 * H + 360 / 12 / 60 * M m_angle = 360/60*M dif_angle = (h_angle - m_angle) % 180 c2 = A**2 + B**2-2*A*B*math.cos(dif_angle/180*math.pi) print(math.sqrt(c2))
import math A, B, H, M = map(int, input().split()) h_angle = 360 / 12 * H + 360 / 12 / 60 * M m_angle = 360/60*M dif_angle = (h_angle - m_angle) c2 = A**2 + B**2-2*A*B*math.cos(dif_angle/180*math.pi) print(math.sqrt(c2))
[ "expression.operation.binary.remove" ]
397,449
397,450
u119982147
python
p02677
#C import math A,B,H,M = map(int,input().split()) a2 = A*A+B*B-2*A*B*math.cos(math.pi*2*(H/12-M/60)) print(math.sqrt(a2))
#C import math A,B,H,M = map(int,input().split()) a2 = A*A+B*B-2*A*B*math.cos(math.pi*2*((H/12+M/720)-M/60)) print(math.sqrt(a2))
[ "call.arguments.change" ]
397,539
397,540
u601426916
python
p02677
import math A,B,H,M = map(int,input().split()) radH = 2*math.pi*H/12 + 30/180*math.pi*M/60 radM = 2*math.pi*M/60 L = math.sqrt(A^2+B^2-2*A*B*math.cos(radH-radM)) print(L)
import math A,B,H,M = map(int,input().split()) radH = 2*math.pi*H/12 + 30/180*math.pi*M/60 radM = 2*math.pi*M/60 L = math.sqrt(A**2+B**2-2*A*B*math.cos(radH-radM)) print(L)
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,547
397,548
u333286360
python
p02677
import numpy as np A, B, H, M = map(int, input().split()) pai = 3.14 angle = 2*pai*((H+M/60)/12 - M/60) distance = np.sqrt(A**2+B**2-2*A*B*np.cos(angle)) print(distance)
import numpy as np import math A, B, H, M = map(int, input().split()) pai = math.pi angle = 2*pai*((H+M/60)/12 - M/60) distance = np.sqrt(A**2+B**2-2*A*B*np.cos(angle)) print(distance)
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove" ]
397,549
397,550
u816500527
python
p02677
import math A,B,H,M = map(int,input().split()) m = H*60 + M r_a = m / 720 r_b = m / 60 r = abs(r_a - r_b) if r > 1: r = abs(r - int(r)) if r > 0.5: r = abs(0.5 - r) c = math.sqrt(A*A + B*B -2*A*B*math.cos(math.radians(360*r))) print(c)
import math A,B,H,M = map(int,input().split()) m = H*60 + M r_a = m / 720 r_b = m / 60 r = abs(r_a - r_b) if r > 1: r = abs(r - int(r)) if r > 0.5: r = abs(1 - r) c = math.sqrt(A*A + B*B -2*A*B*math.cos(math.radians(360*r))) print(c)
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,569
397,570
u129749062
python
p02677
from math import cos, radians, sqrt A, B, H, M = list(map(int,input().split)) m = H * 60 + M h = 360.0 / 60.0 * (m % 60) mi = 360.0 / 720.0 * (m % 720) arg = abs(h - mi) print(sqrt(A**2 + B**2 - 2.0 * A * B * cos(radians(arg))))
from math import cos, radians, sqrt A, B, H, M = list(map(int,input().split())) m = H * 60 + M h = 360.0 / 60.0 * (m % 60) mi = 360.0 / 720.0 * (m % 720) arg = abs(h - mi) print(sqrt(A**2 + B**2 - 2.0 * A * B * cos(radians(arg))))
[ "call.add" ]
397,577
397,578
u957198490
python
p02677
import math A, B, H, M = (int(x) for x in input().split()) minuteAngle = math.radians(M * 6) hourAngle = math.radians(M + H * 60) angleC = abs(hourAngle - minuteAngle) print(math.sqrt((A ** 2) + (B ** 2) - (2 * A * B * math.cos(angleC))))
import math A, B, H, M = (int(x) for x in input().split()) minuteAngle = math.radians(M*6) hourAngle = math.radians(M*1/2 + H*30) angleC = abs(hourAngle - minuteAngle) print(math.sqrt((A**2) + (B**2) - (2*A*B*math.cos(angleC))))
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,581
397,582
u151163404
python
p02677
a, b, h, m = int(input().split()) #長針は60分で一周、短針は720分で一周 #長針は1分で6、短針は1分で0.5 合わせて5.5度離れる min = (60 * h) + m ang0 = (min * 5.5) % 360 if ang0 <= 180: ang = ang0 else: ang = 360 - ang0 import math cos_ang = math.cos(math.radians(ang)) x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang)) print(x)
a, b, h, m = map(int, input().split()) #長針は60分で一周、短針は720分で一周 #長針は1分で6、短針は1分で0.5 合わせて5.5度離れる min = (60 * h) + m ang0 = (min * 5.5) % 360 if ang0 <= 180: ang = ang0 else: ang = 360 - ang0 import math cos_ang = math.cos(math.radians(ang)) x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang)) print(x)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.add" ]
397,583
397,584
u581403769
python
p02677
a, b, h, m = int(input().spllit()) #長針は60分で一周、短針は720分で一周 #長針は1分で6、短針は1分で0.5 合わせて5.5度離れる min = (60 * h) + m ang0 = (min * 5.5) % 360 if ang0 <= 180: ang = ang0 else: ang = 360 - ang0 import math cos_ang = math.cos(math.radians(ang)) x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang)) print(x)
a, b, h, m = map(int, input().split()) #長針は60分で一周、短針は720分で一周 #長針は1分で6、短針は1分で0.5 合わせて5.5度離れる min = (60 * h) + m ang0 = (min * 5.5) % 360 if ang0 <= 180: ang = ang0 else: ang = 360 - ang0 import math cos_ang = math.cos(math.radians(ang)) x = math.sqrt((a ** 2) + (b ** 2) - (2 * a * b * cos_ang)) print(x)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.add", "call.arguments.change" ]
397,585
397,584
u581403769
python
p02677
import math a,b,h,m=map(int,input().split()) x=m*6 y=(h*30)+(m*0.5) result=a**2+b**2-2*a*b*math.cos(min(abs(x-y),abs(y-x))) print(math.sqrt(result))
import math a,b,h,m=map(int,input().split()) x=m*6 y=(h*30)+(m*0.5) result=a**2+b**2-2*a*b*math.cos(math.radians(min(abs(x-y),abs(y-x)))) print(math.sqrt(result))
[ "call.add", "call.arguments.change" ]
397,589
397,590
u350093546
python
p02677
import math A,B,H,M=map(int, input().split()) S=30*H+0.5*M L=6*M if S>L: rad=S-L else: rad=L-S if rad>=180: rad=rad-180 print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(rad))))
import math A,B,H,M=map(int, input().split()) S=30*H+0.5*M L=6*M if S>L: rad=S-L else: rad=L-S if rad>=180: rad=360-rad print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(rad))))
[ "expression.operation.binary.remove" ]
397,593
397,594
u011277545
python
p02677
import numpy as np import math A, B, H, M = map(int, input().split()) d = np.sqrt((B*math.cos(math.degrees(6*M))-A*math.cos(math.degrees(30*H+M/2)))**2+(B*math.sin(math.degrees(6*M))-A*math.sin(math.degrees(30*H+M/2)))**2) print(d)
import numpy as np import math A, B, H, M = map(int, input().split()) d = np.sqrt((B*math.cos(math.radians(6*M))-A*math.cos(math.radians(30*H+M/2)))**2+(B*math.sin(math.radians(6*M))-A*math.sin(math.radians(30*H+M/2)))**2) print(d)
[ "assignment.value.change", "identifier.change", "call.arguments.change", "expression.operation.binary.change" ]
397,597
397,598
u389737182
python
p02677
import math a, b, h, m = map(int, input().split()) m_rad = 6 * m h_rad = 30 * h + m / 2 rad = abs(h_rad - m_rad) rad = rad if rad > 180: rad = 360 - rad print(rad) length_2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(rad)) print(length_2**0.5)
import math a, b, h, m = map(int, input().split()) m_rad = 6 * m h_rad = 30 * h + m / 2 rad = abs(h_rad - m_rad) rad = rad if rad > 180: rad = 360 - rad length_2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(rad)) print(length_2**0.5)
[ "call.remove" ]
397,600
397,601
u679089096
python
p02677
import math a, b, h, m = map(int, input().split()) m_rad = 6 * m h_rad = 30 * h + m / 2 rad = abs(h_rad - m_rad) rad = rad if rad > 180: rad = 360 - rad print(rad) length_2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(90)) print(length_2**0.5)
import math a, b, h, m = map(int, input().split()) m_rad = 6 * m h_rad = 30 * h + m / 2 rad = abs(h_rad - m_rad) rad = rad if rad > 180: rad = 360 - rad length_2 = a**2 + b**2 - 2*a*b*math.cos(math.radians(rad)) print(length_2**0.5)
[ "call.remove", "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "expression.operation.binary.change" ]
397,602
397,601
u679089096
python
p02677
import math def radi(n): return n * math.pi / 180 def resolve(): a, b, h, m = map(int, input().split()) hd = radi(h*30+30*(m/60)) md = radi(360*(m/60)) hx = a * math.cos(hd) hy = a * math.sin(hd) mx = b * math.cos(md) my = b * math.sin(md) x = abs(hx - mx) y = abs(hy - my) v = math.sqrt(x**2 + y**2) print...
import math def radi(n): return n * math.pi / 180 def resolve(): a, b, h, m = map(int, input().split()) hd = radi(h*30+30*(m/60)) md = radi(360*(m/60)) hx = a * math.cos(hd) hy = a * math.sin(hd) mx = b * math.cos(md) my = b * math.sin(md) x = abs(hx - mx) y = abs(hy - my) v = math.sqrt(x**2 + y**2) print...
[ "identifier.change", "call.function.change" ]
397,603
397,604
u423665486
python
p02677
def radi(deg): return deg * (math.pi / 180) def resolve(): ha, hb, h, m = map(int, input().split()) hr = radi(30*h+(m/2)) mr = radi(6*m) hx = ha * math.cos(hr) mx = hb * math.cos(mr) hy = ha * math.sin(hr) my = hb * math.sin(mr) v = (abs(hx - mx)**2 + abs(hy - my)**2)**0.5 print...
import math def radi(deg): return deg * (math.pi / 180) def resolve(): ha, hb, h, m = map(int, input().split()) hr = radi(30*h+(m/2)) mr = radi(6*m) hx = ha * math.cos(hr) mx = hb * math.cos(mr) hy = ha * math.sin(hr) my = hb * math.sin(mr) v = (abs(hx - mx)**2 + abs(hy - my)**2)**...
[]
397,605
397,606
u423665486
python
p02677
import math A, B, H, M = map(int, input().spli3t()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = abs(H_degree - M_degree) if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
import math A, B, H, M = map(int, input().split()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = abs(H_degree - M_degree) if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
[ "assignment.value.change", "identifier.change", "call.arguments.change" ]
397,625
397,626
u125269142
python
p02677
import math A, B, H, M = map(int, input(), split()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = math.abs(H_degree - M_degree) if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
import math A, B, H, M = map(int, input().split()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = abs(H_degree - M_degree) if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
[ "assignment.value.change", "call.arguments.change" ]
397,627
397,626
u125269142
python
p02677
import math A, B, H, M = map(int, input(), split()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = H_degree - M_degree if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
import math A, B, H, M = map(int, input().split()) H_degree = (30 * H) + (0.5 * M) M_degree = 6 * M diff = abs(H_degree - M_degree) if diff > 180: diff = 360 - diff else: diff = diff length = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math.radians(diff))) print(length)
[ "assignment.value.change", "call.arguments.change", "call.add" ]
397,628
397,626
u125269142
python
p02677
import numpy as np a,b,h,m=map(int,input().split()) pi = np.py x = 2*pi*(h*60+m)/720 y = 2*pi*m/60 theta=abs(x-y) cos = np.cos(theta) ans = (a**2+b**2-2*a*b*cos)**0.5 print(ans)
import numpy as np a,b,h,m=map(int,input().split()) pi = np.pi x = 2*pi*(h*60+m)/720 y = 2*pi*m/60 theta=abs(x-y) cos = np.cos(theta) ans = (a**2+b**2-2*a*b*cos)**0.5 print(ans)
[ "assignment.value.change", "identifier.change" ]
397,633
397,634
u747427153
python
p02677
import math def kyori(a,b,c,d): return math.sqrt(a**2+b**2-2*a*b*math.cos(abs(c-d))) A, B, H, M = [int(i) for i in input().split()] m = M* 2*math.pi/60 #rad h = H* 2*math.pi/12+ m*2*math.pi/12/60 #rad #print(h, "\n", m) k=kyori(A,B,h,m) print(k)
import math def kyori(a,b,c,d): return math.sqrt(a**2+b**2-2*a*b*math.cos(abs(c-d))) A, B, H, M = [int(i) for i in input().split()] m = M* 2*math.pi/60 #rad h = H* 2*math.pi/12+ M*2*math.pi/60/12 #rad #print(h, "\n", m) k=kyori(A,B,h,m) print(k)
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
397,643
397,644
u266675845
python
p02677
import math a,b,h,m=map(int, input().split()) th=30*(h+m/60) tm=6*m if th>=tm: tbig=th tsml=tm else: tbig=tm tsml=th print(tm,th) if tbig-tsml <= 180: print((a**2+b**2-2*a*b*math.cos(math.radians(tbig-tsml)))**(1/2)) else: print((a**2+b**2-2*a*b*math.cos(math.radians(360-tbig+tsml)))**(1/2...
import math a,b,h,m=map(int, input().split()) th=30*(h+m/60) tm=6*m if th>=tm: tbig=th tsml=tm else: tbig=tm tsml=th #print(tm,th) if tbig-tsml <= 180: print((a**2+b**2-2*a*b*math.cos(math.radians(tbig-tsml)))**(1/2)) else: print((a**2+b**2-2*a*b*math.cos(math.radians(360-tbig+tsml)))**(1/...
[ "call.remove" ]
397,649
397,650
u665452497
python
p02677
import math s = input("") s = s.split(" ") A = int(s[0]) B = int(s[1]) H = int(s[2]) M = int(s[3]) k = 360*M/60-(360*H/12+360*M/12/60) k = abs(k) j = math.cos(k*3.141592*2/360) c = math.sqrt(A*A+B*B-2*A*B*j) print(c)
import math s = input("") s = s.split(" ") A = int(s[0]) B = int(s[1]) H = int(s[2]) M = int(s[3]) k = 360*M/60-(360*H/12+360*M/12/60) k = abs(k) j = math.cos(k*3.14159265359*2/360) c = math.sqrt(A*A+B*B-2*A*B*j) print(c)
[ "literal.number.float.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,651
397,652
u043940287
python
p02677
import math a,b,H,M=map(int,input().split()) ans=math.sqrt(pow(a,2)+pow(b,2)-2*a*b*math.cos(math.radians(abs(30*H-6*M)))) print(ans)
import math a,b,H,M=map(int,input().split()) ans=math.sqrt(pow(a,2)+pow(b,2)-2*a*b*math.cos(math.radians(abs(30*H-11*M/2)))) print(ans)
[ "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,653
397,654
u446808186
python
p02677
import math A,B,H,M = map(int,input().split()) angH = 30.0*H+0.5*M angM = 6.0*M angD = abs(angH-angM) if angD > 180.0: angD -= 180.0 cosD = math.cos(math.radians(angD)) ans2 = A*A + B*B - 2*A*B *cosD ans = math.sqrt(ans2) print(ans)
import math A,B,H,M = map(int,input().split()) angH = 30.0*H+0.5*M angM = 6.0*M angD = abs(angH-angM) if angD > 180.0: angD = 360.0-angD cosD = math.cos(math.radians(angD)) ans2 = A*A + B*B - 2*A*B *cosD ans = math.sqrt(ans2) print(ans)
[ "assignment.add" ]
397,669
397,670
u390883247
python
p02677
import math def solution(): a, b, h, m = map(int, input().split()) return (a*a+b*b-2*a*b*cos((m*11/360-h/6)*pi))**.5 print(solution())
from math import * def solution(): a, b, h, m = map(int, input().split()) return (a*a+b*b-2*a*b*cos((m*11/360-h/6)*pi))**.5 print(solution())
[]
397,680
397,681
u434846982
python
p02677
import math a, b, h, m = map(int, input().split()) theta = (h * 60 * 0.5+ m * 0.5) % 360 - (h * 60 * 6 + m * 6) % 360 if theta > 180: theta = 360 - theta ab = math.sqrt(a**2+b**2-2*a*b*math.cos(theta)) print(ab)
import math a, b, h, m = map(int, input().split()) theta = (h * 60 * 0.5+ m * 0.5) % 360 - (h * 60 * 6 + m * 6) % 360 if theta > 180: theta = 360 - theta ab = math.sqrt(a**2+b**2-2*a*b*math.cos(math.radians(theta))) print(ab)
[ "call.add", "call.arguments.change" ]
397,686
397,687
u035424059
python
p02677
import math a,b,h,m = map(int, input().split()) ans = math.sqrt(float(a)**2+float(b)**2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2)) print(ans)
import math a,b,h,m = map(int, input().split()) ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2)) print(ans)
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,700
397,701
u198010035
python
p02677
import math a,b,h,m = map(int, input().split()) ans = math.sqrt(float(a)**2+float(b)**2+2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi)) print(ans)
import math a,b,h,m = map(int, input().split()) ans = math.sqrt(float(a)**2+float(b)**2-2*a*b*math.cos((h/12 + m/720 - m/60)*math.pi*2)) print(ans)
[ "misc.opposites", "expression.operator.arithmetic.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,702
397,701
u198010035
python
p02677
import math a, b, h, m = map(int, input().split()) deg_h = 360 / 12 deg_m = 360 / 60 H = h * deg_h + m * deg_m M = m * deg_m deg = abs(H - M) if deg > 180: deg = 360 - deg rad = (deg/180) * math.pi c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad)) print(c)
import math a, b, h, m = map(int, input().split()) deg_h = 360 / 12 deg_m = 360 / 60 H = h * deg_h + m * (deg_h/60) M = m * deg_m deg = abs(H - M) if deg > 180: deg = 360 - deg rad = (deg/180) * math.pi c = math.sqrt(a**2 + b**2 - 2*a*b*math.cos(rad)) print(c)
[ "assignment.value.change", "expression.operation.binary.change" ]
397,724
397,725
u079827881
python
p02677
import math A,B,H,M = map(int,input().split()) k = max(H*30+M*0.5,M*6)-min(H*30+M*0.5,M*6) if k >= 180: k = 360-k print(k) print(math.sqrt(A*A+B*B-2*A*B*math.cos(math.radians(k))))
import math A,B,H,M = map(int,input().split()) k = max(H*30+M*0.5,M*6)-min(H*30+M*0.5,M*6) if k >= 180: k = 360-k print(math.sqrt(A*A+B*B-2*A*B*math.cos(math.radians(k))))
[ "call.remove" ]
397,728
397,729
u608454345
python
p02677
import math A, B, H, M = map(int, open(0).split()) arg_b = math.pi * float(M) / 30 arg_a = (math.pi / 6) * (float(H) + float(M)/60) K = abs(arg_b - arg_a) C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K)) print(C)
import math A, B, H, M = map(int, input().split()) arg_b = math.pi * float(M) / 30 arg_a = (math.pi / 6) * (float(H) + float(M)/60) K = abs(arg_b - arg_a) C = math.sqrt(A*A+B*B - 2*A*B*math.cos(K)) print(C)
[ "assignment.value.change", "identifier.change", "call.function.change", "call.arguments.change" ]
397,730
397,731
u385733796
python
p02677
import numpy def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = np.cos((R-r)*2*np.pi) C = np.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
import numpy as np def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = np.cos((R-r)*2*np.pi) C = np.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
[]
397,735
397,736
u000842852
python
p02677
import numpy as np def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = math.cos((R-r)*2*np.pi) C = np.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
import numpy as np def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = np.cos((R-r)*2*np.pi) C = np.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
[ "assignment.value.change", "identifier.change" ]
397,737
397,736
u000842852
python
p02677
import math def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = math.cos((R-r*2*math.pi)) C = math.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
import math def main(): A, B, H, M = map(float, input().split()) R = H/12 + M*0.5/360 r = M/60 cos = math.cos((R-r)*2*math.pi) C = math.sqrt(A*A + B*B - 2*A*B*cos) print(C) if __name__ == '__main__': main()
[ "call.arguments.change" ]
397,738
397,739
u000842852
python
p02677
import math a,b,h,m = map(lambda x:int(x), input().split(' ')) #2つの針の長さと間の角度から距離を算出 def dst(a,b,deg): return ((a**2+b**2)-(2*a*b*math.cos(math.radians(deg))))**0.5 deg_1 = h*(60*h+m)*0.5 deg_2 = m*6 deg = abs(deg_1-deg_2) if deg > 180: deg = 360-deg ans = dst(a,b,deg) print(ans) #print(dst(3,4,90))
import math a,b,h,m = map(lambda x:int(x), input().split(' ')) #2つの針の長さと間の角度から距離を算出 def dst(a,b,deg): return ((a**2+b**2)-(2*a*b*math.cos(math.radians(deg))))**0.5 deg_1 = (60*h+m)*0.5 deg_2 = m*6 deg = abs(deg_1-deg_2) if deg > 180: deg = 360-deg ans = dst(a,b,deg) print(ans) #print(dst(3,4,90))
[ "expression.operation.binary.remove" ]
397,740
397,741
u528303485
python
p02677
def squared(x): return x**2 def theta(h, m): mr = 6 * m hr = 30 * h + m / 2 r = abs(float(hr) - float(mr)) return r def length(a, b, h, m): return math.sqrt(squared(a) + squared(b) - 2 * a * b * math.cos(math.radians(theta(h, m)))) a, b, h, m = [x for x in map(int, input().split())] print(l...
import math def squared(x): return x**2 def theta(h, m): mr = 6 * m hr = 30 * h + m / 2 r = abs(float(hr) - float(mr)) return r def length(a, b, h, m): return math.sqrt(squared(a) + squared(b) - 2 * a * b * math.cos(math.radians(theta(h, m)))) a, b, h, m = [x for x in map(int, input().split(...
[]
397,752
397,753
u827414558
python
p02677
a,b,h,m=map(int, sys.stdin.readline().rstrip().split()) m_angle = m*6 h_angle = h*30+m/2 theta=abs(h_angle-m_angle) if theta>180:theta=360-theta c = a**2+b**2-2*a*b*math.cos(math.radians(theta)) print(c**0.5)
import sys import math a,b,h,m=map(int, sys.stdin.readline().rstrip().split()) m_angle = m*6 h_angle = h*30+m/2 theta=abs(h_angle-m_angle) if theta>180:theta=360-theta c = a**2+b**2-2*a*b*math.cos(math.radians(theta)) print(c**0.5)
[]
397,754
397,755
u640603056
python
p02677
import math A,B,H,M = map(int, input().split()) hourdegrees = ( H * 60 + M ) * (0.5) mindegrees = M*(6) if mindegrees < hourdegrees: degree = hourdegrees - mindegrees elif mindegrees > hourdegrees: degree = mindegrees - hourdegrees distance = math.sqrt(A ** 2 + B ** 2 -2 * A * B * math.cos(math.radians(degr...
import math A,B,H,M = map(int, input().split()) hourdegrees = ( H * 60 + M ) * (0.5) mindegrees = M*(6) if mindegrees < hourdegrees: degree = hourdegrees - mindegrees else: degree = mindegrees - hourdegrees distance = math.sqrt(A ** 2 + B ** 2 -2 * A * B * math.cos(math.radians(degree) ) )...
[]
397,758
397,759
u951741682
python
p02677
import math pi=3.1415926535897932 a,b,h,m=map(int,input().split()) ad=h*30+m*0.5 bd=m*6.0 print(ad,bd) x=min(abs(ad-bd),360.0-abs(ad-bd)) if abs(x-180.0)<0.0000000001: print(a+b) exit() elif abs(ad-bd)<0.000000001: print(abs(a-b)) exit() ans=a**2+b**2-(2*a*b*math.cos(math.radians(x))) print(ans**0.5)
import math pi=3.1415926535897932 a,b,h,m=map(int,input().split()) ad=h*30+m*0.5 bd=m*6.0 x=min(abs(ad-bd),360.0-abs(ad-bd)) if abs(x-180.0)<0.0000000001: print(a+b) exit() elif abs(ad-bd)<0.000000001: print(abs(a-b)) exit() ans=a**2+b**2-(2*a*b*math.cos(math.radians(x))) print(ans**0.5)
[ "call.remove" ]
397,775
397,776
u123756661
python
p02677
import math pi=3.1415926535897932 a,b,h,m=map(int,input().split()) ad=h*30+m*0.5 bd=m*6.0 x=min(abs(ad-bd),360.0-abs(ad-bd)) if abs(x-180.0)<0.0000000001: print(a+b) exit() elif abs(ad-bd)<0.000000001: print(0) exit() ans=a**2+b**2-(2*a*b*math.cos(math.radians(x))) print(ans**0.5)
import math pi=3.1415926535897932 a,b,h,m=map(int,input().split()) ad=h*30+m*0.5 bd=m*6.0 x=min(abs(ad-bd),360.0-abs(ad-bd)) if abs(x-180.0)<0.0000000001: print(a+b) exit() elif abs(ad-bd)<0.000000001: print(abs(a-b)) exit() ans=a**2+b**2-(2*a*b*math.cos(math.radians(x))) print(ans**0.5)
[ "identifier.replace.add", "literal.replace.remove", "call.arguments.change", "io.output.change", "call.arguments.add" ]
397,777
397,776
u123756661
python
p02677
A, B, H, M = map(int, input().split()) import math s = 30*(H+M/60) t = 6*M r = abs(s-t) if r>180: r = 360-r print(r) a = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(r))) print(a)
A, B, H, M = map(int, input().split()) import math s = 30*(H+M/60) t = 6*M r = abs(s-t) if r>180: r = 360-r a = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(r))) print(a)
[ "call.remove" ]
397,780
397,781
u008382444
python
p02677
A, B, H, M = map(int, input().split()) import math s = 30*H t = 6*M r = abs(s-t) if r>180: r = 360-r a = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(r))) print(a)
A, B, H, M = map(int, input().split()) import math s = 30*(H+M/60) t = 6*M r = abs(s-t) if r>180: r = 360-r a = math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(r))) print(a)
[]
397,782
397,781
u008382444
python
p02677
import math a,b,h,m=map(int,input().split()) tyok=h*30+m*0.5 tank=m*6 sa=0 if abs(tyok-tank)>180: sa=abs(tyok-tank)-180 else: sa=abs(tyok-tank) c=a**2+b**2-2*a*b*math.cos(math.radians(sa)) print(math.sqrt(c))
import math a,b,h,m=map(int,input().split()) tyok=h*30+m*0.5 tank=m*6 sa=0 if abs(tyok-tank)>180: sa=abs(tyok-tank)-360 else: sa=abs(tyok-tank) c=a**2+b**2-2*a*b*math.cos(math.radians(sa)) print(math.sqrt(c))
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change" ]
397,785
397,786
u460386402
python
p02677
import math a,b,h,m = map(int, input().split()) h1 = h * 30 m1 = m * 5.5 r = abs(h1 - m1) a1 = a ** 2 b1 = b ** 2 ab = a * b if r == 0: print(abs(a-b)) elif r == 180: print(a + b) elif 180 < r: r1 = r -180 cos = math.cos(math.radians(r1)) d = a1 + b1 - 2 * ab * cos ans = d ** (1/2) print(ans) else: co...
import math a,b,h,m = map(int, input().split()) h1 = h * 30 m1 = m * 5.5 r = abs(h1 - m1) a1 = a ** 2 b1 = b ** 2 ab = a * b if r == 0: print(abs(a-b)) elif r == 180: print(a + b) elif 180 < r: r1 = 360 - r cos = math.cos(math.radians(r1)) d = a1 + b1 - 2 * ab * cos ans = d ** (1/2) print(ans) else: c...
[ "expression.operation.binary.remove" ]
397,787
397,788
u844558673
python
p02677
import sys from io import StringIO import unittest import math # 参考1:余弦定理(この頁を学習すると、|??|に入る式が分かり、直角三角形でない場合でも第3の辺aの長さを求めることができるようになります。) # https://www.geisya.or.jp/~mwm48961/kou2/cos_rule.htm # aの2乗 = bの2乗 + cの2乗 − 2bccosA # 参考2:コサイン等の関数説明 # https://note.nkmk.me/python-math-sin-cos-tan/ def resolve(): a, b, h, m ...
import sys from io import StringIO import unittest import math # 参考1:余弦定理(この頁を学習すると、|??|に入る式が分かり、直角三角形でない場合でも第3の辺aの長さを求めることができるようになります。) # https://www.geisya.or.jp/~mwm48961/kou2/cos_rule.htm # aの2乗 = bの2乗 + cの2乗 − 2bccosA # 参考2:コサイン等の関数説明 # https://note.nkmk.me/python-math-sin-cos-tan/ def resolve(): a, b, h, m ...
[]
397,791
397,792
u550814027
python
p02677
from math import cos, radians, sqrt A, B, H, M = map(int, input().split()) ang_H = 30 * H + 0.5 * M ang_M = 6 * M ang = abs(ang_H - ang_M) if abs(ang) > 180: ang = 360 - ang_H - ang_M C = A**2 + B**2 - 2*A*B*cos(radians(ang)) print(sqrt(C))
from math import cos, radians, sqrt A, B, H, M = map(int, input().split()) ang_H = 30 * H + 0.5 * M ang_M = 6 * M ang = abs(ang_H - ang_M) if abs(ang) > 180: ang = 360 - ang C = A**2 + B**2 - 2*A*B*cos(radians(ang)) print(sqrt(C))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change", "expression.operation.binary.remove" ]
397,804
397,805
u187798720
python
p02677
import math a,b,h,m = map(int,input().split()) sho_deg = h*0 + m*6 #6(deg/m) lon_deg = h*30 + m*0.5 #0.5(deg/m) deg_dif = abs((sho_deg-lon_deg)%180) print((a**2 + b**2-2*a*b*math.cos(deg_dif/180*math.pi))**0.5)
import math a,b,h,m = map(int,input().split()) sho_deg = h*0 + m*6 #6(deg/m) lon_deg = h*30 + m*0.5 #0.5(deg/m) deg_dif = abs(sho_deg-lon_deg) print((a**2 + b**2-2*a*b*math.cos(deg_dif/180*math.pi))**0.5)
[ "call.arguments.change" ]
397,814
397,815
u972658925
python
p02677
import math import numpy as np inp = list(map(int, input().split())) A = inp[0] B = inp[1] H = inp[2] M = inp[3] H = H*60 + M A_theta = H*0.5 B_theta = M*6 theta = abs(A_theta - B_theta) if theta > 180.0: theta = 360-theta print(theta) ans = (A**2) + (B**2) - (2*A*B*math.cos(theta*(2*np.pi/360))) print(np.sqrt(an...
import math import numpy as np inp = list(map(int, input().split())) A = inp[0] B = inp[1] H = inp[2] M = inp[3] H = H*60 + M A_theta = H*0.5 B_theta = M*6 theta = abs(A_theta - B_theta) if theta > 180.0: theta = 360-theta ans = (A**2) + (B**2) - (2*A*B*math.cos(theta*(2*np.pi/360))) print(np.sqrt(ans))
[ "call.remove" ]
397,825
397,826
u014958112
python
p02677
import math A,B,H,M = map(int,input().split()) ha = 30 * H + 0.5 * M if M == 0 : ma = 360 else: ma = 6 * M if ha > ma: an = ha - ma print((A**2 + B**2 - (2 * A * B * round(math.cos(math.radians(an)),9)))**0.5) elif ma > ha: an = ma - ha print((A**2 + B**2 - (2 * A * B * round(math.cos(math.ra...
import math A,B,H,M = map(int,input().split()) ha = 30 * H + 0.5 * M if M == 0 : ma = 360 else: ma = 6 * M if ha > ma: an = ha - ma print((A**2 + B**2 - (2 * A * B * round(math.cos(math.radians(an)),20)))**0.5) elif ma > ha: an = ma - ha print((A**2 + B**2 - (2 * A * B * round(math.cos(math.r...
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change" ]
397,836
397,837
u270341037
python
p02677
import math A,B,H,M = map(int,input().split()) ha = 30 * H + 0.5 * M if M == 0 : ma = 360 else: ma = 6 * M if ha > ma: an = ha - ma print((A**2 + B**2 - (2 * A * B * round(math.cos(math.radians(an)),9)))**0.5) elif ma > ha: an = ma - ha print((A**2 + B**2 - (2 * A * B * round(math.cos(math.ra...
import math A,B,H,M = map(int,input().split()) ha = 30 * H + 0.5 * M if M == 0 : ma = 360 else: ma = 6 * M if ha > ma: an = ha - ma print((A**2 + B**2 - (2 * A * B * round(math.cos(math.radians(an)),20)))**0.5) elif ma > ha: an = ma - ha print((A**2 + B**2 - (2 * A * B * round(math.cos(math.r...
[ "literal.number.integer.change", "call.arguments.change", "expression.operation.binary.change", "io.output.change", "identifier.replace.add", "literal.replace.remove" ]
397,838
397,837
u270341037
python
p02677
from math import cos,radians,sqrt a,b,h,m=map(int,input().split()) hangle= 30*h + 0.5*m mangle= 60*m angle=hangle-mangle angle=min(360-angle,angle) ans= (a**2 + b**2 - (2*a*b*cos(radians(angle)))) print(sqrt(ans))
from math import cos,radians,sqrt a,b,h,m=map(int,input().split()) hangle= 30*h + 0.5*m mangle= 6*m angle=abs(hangle-mangle) angle=min(360-angle,angle) ans= (a**2 + b**2 - (2*a*b*cos(radians(angle)))) print(sqrt(ans))
[ "literal.number.integer.change", "assignment.value.change", "expression.operation.binary.change", "call.add", "call.arguments.change" ]
397,839
397,840
u614902935
python
p02677
import math a, b, h, m = map(int(), input().split()) angle = abs(30*h - 5.5*m) distance = (a*a + b*b - 2*a*b*math.cos(math.radians(angle))) print(math.sqrt(distance))
import math a, b, h, m = map(int, input().split()) angle = abs(30*h - 5.5*m) distance = (a*a + b*b - 2*a*b*math.cos(math.radians(angle))) print(math.sqrt(distance))
[ "call.arguments.change" ]
397,845
397,846
u635273885
python
p02677
import math a,b,h,m = map(int,input().split()) theta = abs((30*h + 0.5*m) - (6*m)) theta = min(theta,abs(180-theta)) c = (a**2 + b**2 -2*a*b*math.cos(math.radians(theta)))**0.5 print(c)
import math a,b,h,m = map(int,input().split()) theta = abs((30*h + 0.5*m) - (6*m)) theta = min(theta,abs(360-theta)) c = (a**2 + b**2 -2*a*b*math.cos(math.radians(theta)))**0.5 print(c)
[ "literal.number.integer.change", "assignment.value.change", "call.arguments.change", "expression.operation.binary.change" ]
397,847
397,848
u883040023
python
p02677
import math #角度の差を求める A, B, H, M = list(map(int, input().split())) l = (2*math.pi)/(12*60*60) s = (2*math.pi)/(60*60) t = H * 60 * 60 + M * 60 tt = M * 60 lr = l * t sr = s * tt x1 = 4 * math.cos(lr) y1 = 4 * math.sin(lr) x2 = 3 * math.cos(sr) y2 = 3 * math.sin(sr) print(math.sqrt((x1-x2)**2 + (y1-y2)**2))
import math #角度の差を求める A, B, H, M = list(map(int, input().split())) l = (2*math.pi)/(12*60*60) s = (2*math.pi)/(60*60) t = H * 60 * 60 + M * 60 tt = M * 60 lr = l * t sr = s * tt x1 = A * math.cos(lr) y1 = A * math.sin(lr) x2 = B * math.cos(sr) y2 = B * math.sin(sr) print(math.sqrt((x1-x2)**2 + (y1-y2)**2))
[ "assignment.value.change", "identifier.replace.add", "literal.replace.remove", "expression.operation.binary.change" ]
397,856
397,857
u861886710
python
p02677
import math HL,ML,h,m=(int(x) for x in input().split()) HW=int((60*h+m)/2) MW=int(6*m) if HW >= MW: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(math.sqrt(HL*HL+ML*ML-2*HL*ML*math.cos(math.radians(w)))) else: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(mat...
import math HL,ML,h,m=(int(x) for x in input().split()) HW=float((60*h+m)/2) MW=float(6*m) if HW > MW: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(math.sqrt(HL*HL+ML*ML-2*HL*ML*math.cos(math.radians(w)))) else: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(...
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change" ]
397,858
397,859
u834322852
python
p02677
import math HL,ML,h,m=(int(x) for x in input().split()) HW=int((60*h+m)/2) MW=int(6*m) if HW >= MW: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(math.sqrt(HL*HL+ML*ML-2*HL*ML*math.cos(math.radians(w)))) else: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(mat...
import math HL,ML,h,m=(int(x) for x in input().split()) HW=float((60*h+m)/2) MW=float(6*m) if HW > MW: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(math.sqrt(HL*HL+ML*ML-2*HL*ML*math.cos(math.radians(w)))) else: if HW-MW>180: w=360-(HW-MW) else: w=HW-MW print(...
[ "assignment.value.change", "identifier.change", "call.function.change", "expression.operator.compare.change", "control_flow.branch.if.condition.change", "call.arguments.change", "expression.operation.binary.change" ]
397,860
397,859
u834322852
python
p02677
import math A, B, H, M = map(int, input().split()) m_angle = M * 6 h_angle = H * 30 + M * 0.5 angle = abs(m_angle - h_angle) angle = min(angle, 360 - angle) print(angle) C = (A*A + B*B - 2*A*B*math.cos(math.radians(angle)))**0.5 print(C)
import math A, B, H, M = map(int, input().split()) m_angle = M * 6 h_angle = H * 30 + M * 0.5 angle = abs(m_angle - h_angle) angle = min(angle, 360 - angle) C = (A*A + B*B - 2*A*B*math.cos(math.radians(angle)))**0.5 print(C)
[ "call.remove" ]
397,863
397,864
u866124363
python
p02677
import math a,b,h,m = map(int,input().split()) #print(a,b,h,m) minutes=h*60+m sx=b*math.cos(math.radians((90-6*minutes)%360)) sy=b*math.sin(math.radians((90-6*minutes)%360)) tx=a*math.cos(math.radians((90-0.5*minutes)%360)) ty=a*math.sin(math.radians((90-0.5*minutes)%360)) print(tx,ty) l = math.sqrt( (sx-tx)...
import math a,b,h,m = map(int,input().split()) minutes=h*60+m sx=b*math.cos(math.radians((90-6*minutes)%360)) sy=b*math.sin(math.radians((90-6*minutes)%360)) tx=a*math.cos(math.radians((90-0.5*minutes)%360)) ty=a*math.sin(math.radians((90-0.5*minutes)%360)) l = math.sqrt( (sx-tx)**2 + (sy-ty)**2 ) print...
[ "call.remove" ]
397,873
397,874
u601620345
python
p02677
import math #ans^2 = A^2 +B^2 - 2ABconDiffを使用 line = input().split(" ") A = int(line[0]) B = int(line[1]) H = int(line[2]) M = int(line[3]) ans = 0 #Aの刺す分 ang_a = H * 5 + M/12 #Bの刺す時間 ang_b = M if ang_a == ang_b: ans = A - B else: diff = abs(ang_a-ang_b) theta = (diff / 60) * 360 ans_pow = A**2 + B...
# coding: utf-8 import math #ans^2 = A^2 +B^2 - 2ABconDiffを使用 line = input().split(" ") A = int(line[0]) B = int(line[1]) H = int(line[2]) M = int(line[3]) ans = 0 #Aの刺す分 ang_a = H * 5 + M/12 #Bの刺す時間 ang_b = M if ang_a == ang_b: ans = A - B else: diff = abs(ang_a-ang_b) theta = (diff / 60) * 360 a...
[ "call.remove" ]
397,936
397,937
u631631539
python
p02677
import math #ans^2 = A^2 +B^2 - 2ABconDiffを使用 line = input().split(" ") A = int(line[0]) B = int(line[1]) H = int(line[2]) M = int(line[3]) ans = 0 #Aの刺す分 ang_a = H * 5 #Bの刺す時間 ang_b = M if ang_a == ang_b: ans = A - B else: diff = abs(ang_a-ang_b) theta = (diff / 60) * 360 ans_pow = A**2 + B**2 - 2...
# coding: utf-8 import math #ans^2 = A^2 +B^2 - 2ABconDiffを使用 line = input().split(" ") A = int(line[0]) B = int(line[1]) H = int(line[2]) M = int(line[3]) ans = 0 #Aの刺す分 ang_a = H * 5 + M/12 #Bの刺す時間 ang_b = M if ang_a == ang_b: ans = A - B else: diff = abs(ang_a-ang_b) theta = (diff / 60) * 360 a...
[ "assignment.change" ]
397,938
397,937
u631631539
python
p02677
from math import cos, sqrt, radians from fractions import Fraction A, B, H, M = map(Fraction, input().split()) long_deg = M*6 short_deg = H*30 + M*0.5 print(sqrt(A**2+B**2-2*A*B*cos(radians(abs(long_deg-short_deg)%180))))
from math import cos, sqrt, radians from fractions import Fraction A, B, H, M = map(int, input().split()) long_deg = M*6 short_deg = H*30 + M*0.5 print(sqrt(A**2+B**2-2*A*B*cos(radians(long_deg-short_deg))))
[ "assignment.value.change", "identifier.change", "call.arguments.change", "call.remove" ]
397,952
397,953
u762420987
python
p02677
from math import cos, sqrt, radians from fractions import Fraction A, B, H, M = map(Fraction, input().split()) long_deg = M*6 short_deg = H*30 + M*0.5 print(sqrt(A**2+B**2-2*A*B*cos(radians(abs(long_deg-short_deg)%180))))
from math import cos, sqrt, radians from fractions import Fraction A, B, H, M = map(Fraction, input().split()) long_deg = M*6 short_deg = H*30 + M*0.5 print(sqrt(A**2+B**2-2*A*B*cos(radians(long_deg-short_deg))))
[ "call.remove", "call.arguments.change" ]
397,952
397,954
u762420987
python
p02677
import math a,b,h,m=map(int,input().split()) x = abs(math.pi*(60*h-m)/360) ans = ( a**2 + b**2 - math.cos(x)*2*a*b ) **0.5 print(ans)
import math a,b,h,m=map(int,input().split()) x = abs(math.pi*(60*h-11*m)/360) ans = ( a**2 + b**2 - math.cos(x)*2*a*b ) **0.5 print(ans)
[ "assignment.change" ]
397,966
397,967
u821262411
python
p02677
import math a,b,h,m=map(int,input().split()) seconds=h*60+m kaku=seconds*5.5 k_kaku=kaku%360 if k_kaku>180: g_kaku=k_kaku-180 else : g_kaku=k_kaku p_kaku=math.radians(g_kaku) cos=math.cos(p_kaku) l=a**2+b**2-2*a*b*cos len=math.sqrt(l) print(len)
import math a,b,h,m=map(int,input().split()) seconds=h*60+m kaku=seconds*5.5 k_kaku=kaku%360 if k_kaku>180: g_kaku=360-k_kaku else : g_kaku=k_kaku p_kaku=math.radians(g_kaku) cos=math.cos(p_kaku) l=a**2+b**2-2*a*b*cos len=math.sqrt(l) print(len)
[ "expression.operation.binary.remove" ]
397,985
397,986
u239048001
python
p02677
# coding: utf-8 # Your code here! import sys,math (A,B,H,M) = map(int,input().split()) print(A,B,H,M,file=sys.stderr) # 2針の回転角度 rad1 = H*(30) + M*(0.5) rad2 = M*(6) # 内角 rad = abs(rad1 - rad2) ans = 0 # 対辺の長さ if rad == 180: ans = A+B else: rad = rad % 180 ans = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(math...
# coding: utf-8 # Your code here! import sys,math (A,B,H,M) = map(int,input().split()) print(A,B,H,M,file=sys.stderr) # 2針の回転角度 rad1 = H*(30) + M*(0.5) rad2 = M*(6) # 内角 rad = abs(rad1 - rad2) ans = 0 # 対辺の長さ if rad == 180: ans = A+B else: #rad = rad % 180 ans = math.sqrt(A**2 + B**2 - 2*A*B*math.cos(mat...
[ "assignment.remove" ]
397,993
397,994
u565791439
python
p02677
import math a, b, h, m = map(int, input().split()) time = m + h*60 angle = time * 0.5 - time * 6 radian = math.radians(angle) rad = math.cos(radian) ans = b**2 + c**2 - 2*a*b*rad print(math.sqrt(ans))
import math a, b, h, m = map(int, input().split()) time = m + h*60 angle = time * 0.5 - time * 6 radian = math.radians(angle) rad = math.cos(radian) ans = a**2 + b**2 - 2*a*b*rad print(math.sqrt(ans))
[ "assignment.value.change", "identifier.change", "expression.operation.binary.change" ]
398,000
398,001
u502200133
python
p02677
import math # a: 時 # b: 分 # a, b, h, m = map(int, input().split()) angle_h = h * 30 angle_m = m * 6 cos_ = math.cos( math.radians( abs( angle_h - angle_m ) ) ) x = ( a**2 + b**2 - 2*a*b*cos_ ) ** 0.5 print(x)
import math # a: 時 # b: 分 # a, b, h, m = map(int, input().split()) angle_h = h * 30 + m * 0.5 angle_m = m * 6 cos_ = math.cos( math.radians( abs( angle_h - angle_m ) ) ) x = ( a**2 + b**2 - 2*a*b*cos_ ) ** 0.5 print(x)
[ "assignment.change" ]
398,005
398,006
u534308356
python