Smallest Value
Finding the minimum value is useful everywhere: the lowest price, the worst score, or the coldest temperature. Write a function find_smallest_int that takes a non-empty list of numbers arr and returns the smallest number. The list may contain negative values too.
Примеры
Ввод
[34, 15, 88, 2]Вывод
2Ввод
[34, -345, -1, 100]Вывод
-345Ввод
[1, 2, 3, 4, 5]Вывод
1Нужно реализовать
def find_smallest_int(arr: list[int]) -> int:
Теги
listsarraymath
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inVisible tests
1
Input
[34,15,88,2]Expected
22
Input
[34,-345,-1,100]Expected
-3453
Input
[1,2,3,4,5]Expected
14
Input
[10]Expected
105
Input
[-5,-4,-3]Expected
-56
Input
[34,15,88,2,34]Expected
2Focus radio
Paused · SomaFM · Fluid