Tallest Candles
On the cake, only the tallest candles can be blown out, so first you need to know the maximum height. The function birthday_cake_candles receives a list of candle heights candles. Return how many candles have a height equal to the maximum value in the list.
Примеры
Ввод
[3, 2, 1, 3]Вывод
2Ввод
[4, 4, 1, 3]Вывод
2Ввод
[1]Вывод
1Нужно реализовать
def birthday_cake_candles(candles: list[int]) -> int:
Теги
arraymath
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
EntrarVisible tests
1
Input
[3,2,1,3]Expected
22
Input
[4,4,1,3]Expected
23
Input
[1]Expected
14
Input
[5,5,5,5]Expected
45
Input
[1,2,3,4,5]Expected
16
Input
[1,1]Expected
2Focus radio
Paused · SomaFM · Fluid