Smallest Value
When you have a set of numbers, you often need to quickly find the minimum value: a price, score, temperature, or any other measurement. Write find_smallest_int, which takes a non-empty list arr and returns the smallest number in it. The numbers may be positive or negative.
Примеры
Ввод
[78, 56, 232, 12, 8]Вывод
8Ввод
[-3, -2, -1, 0]Вывод
-3Ввод
[34, 15, 88, 2]Вывод
2Нужно реализовать
def find_smallest_int(arr: list[int]) -> int:
Теги
arraymath
Idħol biex tara l-istorja tas-sottomissjonijiet
IdħolIdħol biex tuża l-Mentor tal-AI
IdħolVisible tests
1
Input
[78,56,232,12,8]Expected
82
Input
[-3,-2,-1,0]Expected
-33
Input
[34,15,88,2]Expected
24
Input
[5]Expected
55
Input
[0,0,0]Expected
06
Input
[0]Expected
0Focus radio
Paused · SomaFM · Fluid