|
|
вернуться в форумWA#2 Послано JavXn1 6 май 2021 00:41 import math import operator n = int(input()) s = input() l1 = s.split(" ") x = int(l1[0]) y = int(l1[1]) sp = {} for i in range(n-1): s = input().split(" ") x1 = int(s[0]) y1 = int(s[1]) dx = x1-x dy = y1-y dl = math.sqrt(math.pow(dx,2)+math.pow(dy,2)) a = math.degrees(math.asin(dy/dl)) #print(a) sp.update({i+2:a}) sorted_tuples = sorted(sp.items(), key=operator.itemgetter(1)) #print(sorted_tuples) print("1") print(sorted_tuples[len(sorted_tuples)//2][0]) |
|
|