Утнасун Муниев, 514 группа TriangleSquare 6873 | Лазарев Артур Дмитриевич 514 TriangleSquare 6936 | ||||
---|---|---|---|---|---|
t | 1 | from decimal import Decimal, getcontext | t | 1 | from decimal import Decimal, getcontext |
2 | getcontext().prec = 200 | 2 | getcontext().prec = 200 | ||
3 | x1, y1, x2, y2, x3, y3 = map(Decimal, input().split(',')) | 3 | x1, y1, x2, y2, x3, y3 = map(Decimal, input().split(',')) | ||
4 | a = Decimal(x1 * (y2 - y3)) | 4 | a = Decimal(x1 * (y2 - y3)) | ||
5 | b = Decimal(x2 * (y3 - y1)) | 5 | b = Decimal(x2 * (y3 - y1)) | ||
6 | c = Decimal(x3 * (y1 - y2)) | 6 | c = Decimal(x3 * (y1 - y2)) | ||
7 | area = abs((a + b + c) / 2) | 7 | area = abs((a + b + c) / 2) | ||
8 | print(area) | 8 | print(area) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|