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
PostgreSQLv16

Le résultat de l'exécution du code s'affichera ici

Visible tests
1
Input
[34,15,88,2]
Expected2
2
Input
[34,-345,-1,100]
Expected-345
3
Input
[1,2,3,4,5]
Expected1
4
Input
[10]
Expected10
5
Input
[-5,-4,-3]
Expected-5
6
Input
[34,15,88,2,34]
Expected2
Focus radio
Paused · SomaFM · Fluid