Monkey Countdown
Imagine counting monkeys out loud: first, second, third, and so on up to the needed number. Write a function monkey_count that takes n and returns a list of numbers from 1 to n, inclusive. Start from 1, not from 0.
Примеры
Ввод
5Вывод
[1, 2, 3, 4, 5]Ввод
1Вывод
[1]Ввод
3Вывод
[1, 2, 3]Нужно реализовать
def monkey_count(n: int) -> list[int]:
Теги
listsarraymath
Prijavi se da vidiš povijest predaja
PrijavaPrijavi se da koristiš AI mentora
PrijavaVisible tests
1
Input
5Expected
[1,2,3,4,5]2
Input
1Expected
[1]3
Input
3Expected
[1,2,3]4
Input
9Expected
[1,2,3,4,5,6,7,8,9]5
Input
10Expected
[1,2,3,4,5,6,7,8,9,10]6
Input
-10Expected
[]Focus radio
Paused · SomaFM · Fluid