| Долгих Данила TriangleSquare 3180 | action22k TriangleSquare 2961 | ||||
|---|---|---|---|---|---|
| f | 1 | from decimal import Decimal, getcontext | f | 1 | from decimal import Decimal, getcontext |
| 2 | getcontext().prec = 2000 | 2 | getcontext().prec = 2000 | ||
| t | 3 | str = input().replace(' ', '') | t | 3 | s = input().replace(' ', '') |
| 4 | l = [Decimal(x) for x in str.split(',')] | 4 | a = [Decimal(x) for x in s.split(',')] | ||
| 5 | s = abs((l[0] * (l[3] - l[5]) + l[2] * (l[5] - l[1]) + l[4] * (l[1] - l[ | 5 | ans = abs((a[0] * (a[3] - a[5]) + a[2] * (a[5] - a[1]) + a[4] * (a[1] - | ||
| > | 3])) / Decimal(2)) | > | a[3])) / Decimal(2)) | ||
| 6 | print(format(s, 'f')) | 6 | print(format(ans, 'f')) | ||
| Legends | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
| |||||||||