|
|
back to boardHow I have beaten Runtime Error on python and got AC You have to make one more "if" ###################################################################################### d = math.sin(p1) * math.sin(p2) + math.cos(p1) * math.cos(p2) * math.cos(abs(l1 - l2)) if str(d) == '-1.0000000000000002': d = int(d) d = math.acos(d) * 3437.5 ###################################################################################### there is a test where '-1.0000000000000002' in d so thats why acos gives error, you have to change '-1.0000000000000002' to -1 Edited by author 20.04.2023 21:49 Edited by author 20.04.2023 21:49 |
|
|