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