DotBox/tomas1999 | DotBox/Dr.Slink | ||||
---|---|---|---|---|---|
n | 1 | t = input() | n | 1 | s = input() |
2 | x, y, z = eval(t) | 2 | x, y, z = eval(s) | ||
3 | Minx = Maxx = x | 3 | minx = maxx = x | ||
4 | Miny = Maxy = y | 4 | miny = maxy = y | ||
5 | Minz = Maxz = z | 5 | minz = maxz = z | ||
6 | 6 | ||||
n | 7 | while t != "": | n | 7 | while s: |
8 | x, y, z = eval(t) | 8 | x, y, z = eval(s) | ||
9 | if x < Minx: | 9 | if x < minx: | ||
10 | Minx = x | 10 | minx = x | ||
11 | elif x > Maxx: | 11 | elif x > maxx: | ||
12 | Maxx = x | 12 | maxx = x | ||
13 | 13 | ||||
n | 14 | if y < Miny: | n | 14 | if y < miny: |
15 | Miny = y | 15 | miny = y | ||
16 | elif y > Maxy: | 16 | elif y > maxy: | ||
17 | Maxy = y | 17 | maxy = y | ||
18 | 18 | ||||
n | 19 | if z < Minz: | n | 19 | if z < minz: |
20 | Minz = z | 20 | minz = z | ||
21 | elif z > Maxz: | 21 | elif z > maxz: | ||
22 | Maxz = z | 22 | maxz = z | ||
23 | 23 | ||||
n | 24 | t = input() | n | 24 | s = input() |
25 | 25 | ||||
n | n | 26 | print((maxx - minx) * (maxy - miny) * (maxz - minz)) | ||
26 | 27 | ||||
t | 27 | print((Maxx - Minx) * (Maxy - Miny) * (Maxz - Minz)) | t | ||
28 |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|