Volume Difference
Imagine you have two boxes and need to know how much more space one can hold than the other. Write a function find_difference that takes the dimensions of two cuboids a and b as lists: length, width, and height. Calculate each volume and return the absolute difference between them.
Примеры
Ввод
[3, 2, 5], [1, 4, 4]Вывод
14Ввод
[9, 7, 2], [5, 2, 2]Вывод
106Ввод
[1, 1, 1], [1, 1, 1]Вывод
0Нужно реализовать
def find_difference(a: list[int], b: list[int]) -> int:
Теги
mathlistsarray
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaVisible tests
1
Input
[3,2,5], [1,4,4]Expected
142
Input
[9,7,2], [5,2,2]Expected
1063
Input
[1,1,1], [1,1,1]Expected
04
Input
[2,2,2], [1,1,1]Expected
75
Input
[10,10,10], [5,5,5]Expected
8756
Input
[2,2,2], [1,1,1,1,1]Expected
7Focus radio
Paused · SomaFM · Fluid