Пуртов Богдан, 321 группа DotBox 648 | Екатерина Шустова, 316 группа DotBox 1370 | ||||
---|---|---|---|---|---|
n | 1 | (min_x, min_y, min_z) = eval(input()) | n | 1 | (x_min, y_min, z_min) = eval(input()) |
2 | max_x = min_x | 2 | x_max = x_min | ||
3 | max_y = min_y | 3 | y_max = y_min | ||
4 | max_z = min_z | 4 | z_max = z_min | ||
5 | while (s := input()): | 5 | while (s := input()): | ||
t | 6 | (a, b, c) = eval(s) | t | 6 | (x, y, z) = eval(s) |
7 | if a < min_x: | 7 | if x < x_min: | ||
8 | min_x = a | ||||
9 | if a > max_x: | ||||
10 | max_x = a | ||||
11 | if b < min_y: | ||||
12 | min_y = b | 8 | x_min = x | ||
13 | if b > max_y: | 9 | elif x > x_max: | ||
14 | max_y = b | 10 | x_max = x | ||
15 | if c < min_z: | 11 | if y < y_min: | ||
16 | min_z = c | 12 | y_min = y | ||
17 | if c > max_z: | 13 | elif y > y_max: | ||
18 | max_z = c | 14 | y_max = y | ||
19 | print((max_x - min_x) * (max_y - min_y) * (max_z - min_z)) | 15 | if z < z_min: | ||
16 | z_min = z | ||||
17 | elif z > z_max: | ||||
18 | z_max = z | ||||
19 | print((x_max - x_min) * (y_max - y_min) * (z_max - z_min)) |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|