DotBox/olya_bel | DotBox/Dr.Slink | ||||
---|---|---|---|---|---|
n | 1 | str = input() | n | 1 | s = input() |
2 | x, y, z = eval(str) | 2 | x, y, z = eval(s) | ||
3 | xmin = xmax = x | 3 | minx = maxx = x | ||
4 | ymin = ymax = y | 4 | miny = maxy = y | ||
5 | zmin = zmax = z | 5 | minz = maxz = z | ||
6 | 6 | ||||
n | 7 | while str: | n | 7 | while s: |
8 | x, y, z = eval(str) | 8 | x, y, z = eval(s) | ||
9 | if x < xmin: | 9 | if x < minx: | ||
10 | xmin = x | 10 | minx = x | ||
11 | if x > xmax: | 11 | elif x > maxx: | ||
12 | xmax = x | 12 | maxx = x | ||
13 | if y < ymin: | ||||
14 | ymin = y | ||||
15 | if y > ymax: | ||||
16 | ymax = y | ||||
17 | if z < zmin: | ||||
18 | zmin = z | ||||
19 | if z > zmax: | ||||
20 | zmax = z | ||||
21 | 13 | ||||
n | 22 | str = input() | n | 14 | if y < miny: |
23 | else: | 15 | miny = y | ||
24 | print(abs((xmax-xmin)*(ymax-ymin)*(zmax-zmin))) | 16 | elif y > maxy: | ||
17 | maxy = y | ||||
25 | 18 | ||||
t | t | 19 | if z < minz: | ||
20 | minz = z | ||||
21 | elif z > maxz: | ||||
22 | maxz = z | ||||
23 | |||||
24 | s = input() | ||||
25 | |||||
26 | print((maxx - minx) * (maxy - miny) * (maxz - minz)) | ||||
27 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|