Countdown List

A reversed sequence is like a countdown before a launch: the numbers go from bigger to smaller. Write reverse_seq, which takes a natural number n and returns a list of numbers from n down to 1, inclusive. The order must be strictly descending.

Примеры

Ввод
5
Вывод
[5, 4, 3, 2, 1]
Ввод
1
Вывод
[1]
Ввод
3
Вывод
[3, 2, 1]

Нужно реализовать

def reverse_seq(n: int) -> list[int]:

Теги

arraymath
PostgreSQLv16

Ovdje će se prikazati rezultat izvršavanja koda

Visible tests
1
Input
5
Expected[5,4,3,2,1]
2
Input
1
Expected[1]
3
Input
3
Expected[3,2,1]
4
Input
9
Expected[9,8,7,6,5,4,3,2,1]
5
Input
2
Expected[2,1]
6
Input
10
Expected[10,9,8,7,6,5,4,3,2,1]
Focus radio
Paused · SomaFM · Fluid